gpt4 book ai didi

javascript - Vue - 为什么有些图像在生产中获得哈希值,而其他图像则没有?

转载 作者:行者123 更新时间:2023-11-28 16:43:00 24 4
gpt4 key购买 nike

我的一些图标有这个 CSS:

ul.grid-list li.input-grid-box input.input.consumption {
background: url(../img/icons/icon-consumption.png) no-repeat scroll 3px 14px;
background-size: 21px;
}
ul.grid-list li.input-grid-box input.input.workforce {
background: url(../img/icons/icon-workforce.png) no-repeat scroll 3px 11px;
background-size: 14px;
}
ul.grid-list li.input-grid-box input.input.time {
background: url(../img/icons/icon-time.png) no-repeat scroll 3px 10px;
background-size: 16px;
}
ul.grid-list li.input-grid-box input.input.rooms {
background: url(../img/icons/icon-rooms.png) no-repeat scroll 3px 7px;
background-size: 20px;
}

每次我构建元素并查看 dist/assets/img 时,只有一个图标 (icon-rooms) 具有哈希值 (icon-rooms.575a049f.png),而所有其他都位于/icons/文件夹内,没有这样的哈希值。这是为什么?

最佳答案

默认情况下,生成的静态资源在其文件名中包含哈希值,以实现更好的缓存控制。

See official vue.js documentation

不过您可以禁用此功能。

关于javascript - Vue - 为什么有些图像在生产中获得哈希值,而其他图像则没有?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60916093/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com