From 4b1d0d213985c8e4cde1af10c0dc3f2641b2777d Mon Sep 17 00:00:00 2001 From: Frost-ZX Date: Sun, 8 Sep 2024 16:59:41 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E5=B7=A5=E5=85=B7=E7=AE=B1):=20=E8=A7=A3?= =?UTF-8?q?=E5=86=B3=E6=89=93=E5=8C=85=E5=90=8E=E5=B7=A5=E5=85=B7=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=97=A0=E6=B3=95=E6=98=BE=E7=A4=BA=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/js/toolbox-data.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/assets/js/toolbox-data.js b/src/assets/js/toolbox-data.js index 27d7fe0..18581e2 100644 --- a/src/assets/js/toolbox-data.js +++ b/src/assets/js/toolbox-data.js @@ -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 工具列表 @@ -230,7 +229,7 @@ export const toolList = [ */ function getDynamicComponent(path) { - let key = new URL(`../../views/ToolboxView/${path}.vue`, META_URL).pathname; + let key = `../../views/ToolboxView/${path}.vue`; let component = MODULES[key]; return component;