fix(工具箱): 解决打包后工具页面无法显示的问题

This commit is contained in:
2024-09-08 16:59:41 +08:00
parent bcd8fc3963
commit 4b1d0d2139

View File

@@ -1,7 +1,6 @@
// 工具箱 // 工具箱
const META_URL = import.meta.url; const MODULES = import.meta.glob('../../views/ToolboxView/**/*.vue');
const MODULES = import.meta.glob('@/views/ToolboxView/**/*.vue');
/** /**
* @desc 工具列表 * @desc 工具列表
@@ -230,7 +229,7 @@ export const toolList = [
*/ */
function getDynamicComponent(path) { function getDynamicComponent(path) {
let key = new URL(`../../views/ToolboxView/${path}.vue`, META_URL).pathname; let key = `../../views/ToolboxView/${path}.vue`;
let component = MODULES[key]; let component = MODULES[key];
return component; return component;