From 52bb554e44db3f75bcd49b978bf40d778119bb00 Mon Sep 17 00:00:00 2001 From: Michael1994312 <31500927+Michael1994312@users.noreply.github.com> Date: Tue, 20 Feb 2024 16:50:07 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8vite5=E4=B8=8B?= =?UTF-8?q?=E6=8A=A5=E9=94=99=EF=BC=9AglobEager=20is=20not=20a=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vite5中import.meta.globEager已经被废弃 --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 474fe2bf..595269e5 100644 --- a/src/main.js +++ b/src/main.js @@ -32,7 +32,7 @@ app.use(ArcoVue, {}) .use(globalComponents) // 注册ma-icon图标 -const modules = import.meta.globEager('./assets/ma-icons/*.vue') +const modules = import.meta.glob('./assets/ma-icons/*.vue', { eager: true }) for (const path in modules) { const name = path.match(/([A-Za-z0-9_-]+)/g)[2] const componentName = `MaIcon${name}` @@ -51,4 +51,4 @@ console.log('MineAdmin 官网 https://www.mineadmin.com') console.log('MineAdmin 文档 https://doc.mineadmin.com') console.log('MineAdmin Github https://github.com/kanyxmo/MineAdmin') console.log('MineAdmin-Vue Github https://github.com/kanyxmo/MineAdmin-Vue') -console.log('请不要吝啬您的 star,谢谢 ~ 🤩🤩🤩') \ No newline at end of file +console.log('请不要吝啬您的 star,谢谢 ~ 🤩🤩🤩')