From 805f991791d1152063001df491bb93b8a9a29f2e Mon Sep 17 00:00:00 2001 From: lyt <1105290566@qq.com> Date: Tue, 19 Apr 2022 21:15:06 +0800 Subject: [PATCH] =?UTF-8?q?'admin-22.04.19:=E4=BF=AE=E5=A4=8D=E6=89=93?= =?UTF-8?q?=E5=8C=85=E9=94=99=E8=AF=AF=E9=97=AE=E9=A2=98'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 - src/router/frontEnd.ts | 2 +- src/router/index.ts | 2 +- vite.config.ts | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2597054..5f6db54 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,6 @@ - 🐞 修复 分栏模式下,选中的菜单是 primary 样式,鼠标移入字也变成 primary 色了,感谢群友@孤夜-流殇 - 🐞 修复 [vuex 里面改了颜色 但是不生效 #I4WFMA](https://gitee.com/lyt-top/vue-next-admin/issues/I4WFMA) - 🐞 修复 全局主题 primary 清空颜色后报错,[#I4X0LG](https://gitee.com/lyt-top/vue-next-admin/issues/I4X0LG),感谢[面向 BUG 编程](https://gitee.com/fhtfy) -- 🐞 修复 [模拟动态路由时刷新会丢失路由 #I4PR9S](https://gitee.com/lyt-top/vue-next-admin/issues/I4PR9S),感谢[tottimctj](https://gitee.com/tottimctj) - 🐞 修复 [.eslintrc.js 文件 rules 标签名错误 #I53IPK](https://gitee.com/lyt-top/vue-next-admin/issues/I53IPK),感谢[yuyong1566](https://gitee.com/yuyong1566) ## 2.0.2 diff --git a/src/router/frontEnd.ts b/src/router/frontEnd.ts index 1d0ad20..52941f5 100644 --- a/src/router/frontEnd.ts +++ b/src/router/frontEnd.ts @@ -21,5 +21,5 @@ export async function initFrontEndControlRoutes() { // 添加动态路由 await setAddRoute(); // 设置递归过滤有权限的路由到 vuex routesList 中(已处理成多级嵌套路由)及缓存多级嵌套数组处理后的一维数组 - setFilterMenuAndCacheTagsViewRoutes(); + await setFilterMenuAndCacheTagsViewRoutes(); } diff --git a/src/router/index.ts b/src/router/index.ts index d382b31..fb4bc02 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -203,7 +203,7 @@ const storesThemeConfig = useThemeConfig(pinia); const { themeConfig } = storeToRefs(storesThemeConfig); const { isRequestRoutes } = themeConfig.value; // 前端控制路由:初始化方法,防止刷新时路由丢失 -if (!isRequestRoutes) await initFrontEndControlRoutes(); +if (!isRequestRoutes) initFrontEndControlRoutes(); // 路由加载前 router.beforeEach(async (to, from, next) => { diff --git a/vite.config.ts b/vite.config.ts index 67484d4..cf7bc27 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -46,7 +46,7 @@ const viteConfig = defineConfig((mode: ConfigEnv) => { assetFileNames: `assets/[name].${new Date().getTime()}.[ext]`, compact: true, manualChunks: { - vue: ['vue', 'vue-router', 'vuex'], + vue: ['vue', 'vue-router', 'pinia'], echarts: ['echarts'], }, },