页面有个图片我是动态设置的。本地运行可以。但是打包之后一直没有找到。
export const businessIcon = [ { businessCode: "B001", img: "../../src/assets/images/navigation/B001.png", ];
我本来使用的绝对定位发现不行,改成了相对的也不行,
最后改成下面的这种就可以啦。
export const businessIcon = [ { businessCode: "B001", img: new URL("../../src/assets/images/navigation/B001.png", import.meta.url).href }, ];