fix: 修改图片引入打包报错的问题

This commit is contained in:
MTrun
2022-02-28 20:26:04 +08:00
parent 5675ea0720
commit 63ed00bd28
17 changed files with 249 additions and 276 deletions
+1 -2
View File
@@ -118,7 +118,6 @@
import { reactive, ref, onMounted } from 'vue'
import {
routerTurnByName,
requireUrl,
cryptoEncode,
setLocalStorage
} from '@/utils'
@@ -199,7 +198,7 @@ const bgList = ref([
// 处理url获取
const getImageUrl = (name: string, folder: string) => {
return requireUrl(`../assets/images/${folder}/`, `${name}.png`)
return new URL(`../../assets/images/${folder}/${name}.png`, import.meta.url).href
}
// 打乱