fix:修复vite打包小图片丢失的坑

This commit is contained in:
Xwen
2023-12-15 00:48:17 +08:00
parent 849b8d0322
commit 3d4368544f
4 changed files with 4 additions and 4 deletions

View File

@@ -50,14 +50,14 @@ const userInfo = reactive({
role: [],
id: "",
});
const iconUrl = ref("../../src/assets/common/icons/logo.ico");
const iconUrl = ref("/logo.ico");
const iconUrlHandler = () => {
if (
userInfo.icon == null ||
userInfo.icon == undefined ||
userInfo.icon == ""
) {
return "../../src/assets/common/icons/logo.ico";
return "/logo.ico";
}
return `${import.meta.env.VITE_APP_BASEAPI}/file/${userInfo.icon}`;
};