如图,在配置"publicPath": "./"的情况下,打包后图一和图三同样使用@引用,图三正常显示,图一就不能正常加载显示
图一(大小是30.9kb,http://localhost:1001/pages/unveiling/static/img/img_resume.4a401b53.png 路径多引用了,所以报错404,/pages/unveiling就是页面所在的路径);
图二(引用路径为http://localhost:1001/static/images/img_resume.png),使用/斜杠直接引入能正常显示;
图三(大小是1.41kb,路径显示为base64)。
页面有个75kb大小的图片也能正常显示,应该不是大小影响的吧,也是用@/static...引入
为什么有的图片使用@不行呢,这种情况如何解决呢?

4***@qq.com
- 发布:2023-02-16 14:55
- 更新:2024-01-04 18:57
- 阅读:331
