From d7d7dce744d1df1d34887df3b9d32a9916473472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Sat, 18 Jun 2022 22:58:35 +0800 Subject: [PATCH] =?UTF-8?q?magic-import=20=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- magic-boot-ui/src/scripts/magic-import.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magic-boot-ui/src/scripts/magic-import.js b/magic-boot-ui/src/scripts/magic-import.js index 62f9464..bdcf166 100644 --- a/magic-boot-ui/src/scripts/magic-import.js +++ b/magic-boot-ui/src/scripts/magic-import.js @@ -5,8 +5,9 @@ const libs = { vue, 'element-plus': ElementPlus } + window.___magic__import__ = function(lib, name){ - if(typeof(libs[lib]) == 'function'){ + if(Object.prototype.toString.call(libs[lib]) != '[object Module]' && name == '*'){ return libs[lib] } return (libs[lib] || {})[name]