From fd7d2fc75d22a656d66ba1c56c50744b1365a2b1 Mon Sep 17 00:00:00 2001 From: LLLucky <3338110025@qq.com> Date: Fri, 29 Dec 2023 06:58:14 +0000 Subject: [PATCH] =?UTF-8?q?update=20=E7=9F=A5=E8=AF=86=E5=BA=93/=E5=89=8D?= =?UTF-8?q?=E7=AB=AF/03-=E2=98=86=E5=AE=9E=E6=88=98=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E2=98=86/web=E9=A1=B9=E7=9B=AE=E5=AE=9E=E6=88=98/02-=E3=80=90?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E7=89=88=E3=80=91vue3+vite4/small-web/doc/11?= =?UTF-8?q?-Pinia.md.=20=E5=8E=9F=E6=96=87=E8=A7=A3=E9=87=8A=EF=BC=9Ahttps?= =?UTF-8?q?://frontend.devrank.cn/traffic-information/7307155411092883494?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: LLLucky <3338110025@qq.com> --- .../small-web/doc/11-Pinia.md" | 3 +++ 1 file changed, 3 insertions(+) diff --git "a/\347\237\245\350\257\206\345\272\223/\345\211\215\347\253\257/03-\342\230\206\345\256\236\346\210\230\351\241\271\347\233\256\342\230\206/web\351\241\271\347\233\256\345\256\236\346\210\230/02-\343\200\220\347\254\254\344\272\214\347\211\210\343\200\221vue3+vite4/small-web/doc/11-Pinia.md" "b/\347\237\245\350\257\206\345\272\223/\345\211\215\347\253\257/03-\342\230\206\345\256\236\346\210\230\351\241\271\347\233\256\342\230\206/web\351\241\271\347\233\256\345\256\236\346\210\230/02-\343\200\220\347\254\254\344\272\214\347\211\210\343\200\221vue3+vite4/small-web/doc/11-Pinia.md" index 5e6cfd1..0bacc4a 100644 --- "a/\347\237\245\350\257\206\345\272\223/\345\211\215\347\253\257/03-\342\230\206\345\256\236\346\210\230\351\241\271\347\233\256\342\230\206/web\351\241\271\347\233\256\345\256\236\346\210\230/02-\343\200\220\347\254\254\344\272\214\347\211\210\343\200\221vue3+vite4/small-web/doc/11-Pinia.md" +++ "b/\347\237\245\350\257\206\345\272\223/\345\211\215\347\253\257/03-\342\230\206\345\256\236\346\210\230\351\241\271\347\233\256\342\230\206/web\351\241\271\347\233\256\345\256\236\346\210\230/02-\343\200\220\347\254\254\344\272\214\347\211\210\343\200\221vue3+vite4/small-web/doc/11-Pinia.md" @@ -31,6 +31,9 @@ app.config.globalProperties.$store = store; ``` // 拿到modules下的所有文件 const modulesFiles = import.meta.globEager('./modules/*.*'); +// vite5 使用如下方式!!! +// const modulesFiles = import.meta.glob('./modules/*.*',{ eager: true }); + const modules = {}; for (const key in modulesFiles) { const moduleName = key.replace(/(.*\/)*([^.]+).*/gi, '$2'); -- Gitee