From 6109b2e96e6818bd8f455e1cef96fabca1368498 Mon Sep 17 00:00:00 2001 From: yixiaco <627428179@qq.com> Date: Thu, 23 Nov 2023 09:37:53 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=9A=84=E8=8F=9C=E5=8D=95=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?tabs=E6=A0=87=E7=AD=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/tabs-router.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ruoyi-ui/src/store/modules/tabs-router.ts b/ruoyi-ui/src/store/modules/tabs-router.ts index 89dd71b2..50157b0d 100644 --- a/ruoyi-ui/src/store/modules/tabs-router.ts +++ b/ruoyi-ui/src/store/modules/tabs-router.ts @@ -38,11 +38,8 @@ export const useTabsRouterStore = defineStore('tabsRouter', { // 处理新增 appendTabRouterList(newRoute: TRouterInfo) { // 不要将判断条件newRoute.meta.keepAlive !== false修改为newRoute.meta.keepAlive,starter默认开启保活,所以meta.keepAlive未定义时也需要进行保活,只有显式说明false才禁用保活。 - const needAlive = - !ignoreCacheRoutes.includes(newRoute.name as string) && - (newRoute.meta?.keepAlive ?? !newRoute.meta?.noCache) !== false; + const needAlive = !ignoreCacheRoutes.includes(newRoute.name as string); if (!this.tabRouters.find((route: TRouterInfo) => route.path === newRoute.path)) { - // eslint-disable-next-line no-param-reassign this.tabRouterList = this.tabRouterList.concat({ ...newRoute, isAlive: needAlive }); } }, From 58deec9f77e4c717a0ca98ac7d699015d97c506e Mon Sep 17 00:00:00 2001 From: yixiaco <627428179@qq.com> Date: Thu, 23 Nov 2023 09:39:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E7=BC=93?= =?UTF-8?q?=E5=AD=98=E7=9A=84=E8=8F=9C=E5=8D=95=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?tabs=E6=A0=87=E7=AD=BE=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/store/modules/tabs-router.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/ruoyi-ui/src/store/modules/tabs-router.ts b/ruoyi-ui/src/store/modules/tabs-router.ts index 50157b0d..341c0fe7 100644 --- a/ruoyi-ui/src/store/modules/tabs-router.ts +++ b/ruoyi-ui/src/store/modules/tabs-router.ts @@ -37,7 +37,6 @@ export const useTabsRouterStore = defineStore('tabsRouter', { }, // 处理新增 appendTabRouterList(newRoute: TRouterInfo) { - // 不要将判断条件newRoute.meta.keepAlive !== false修改为newRoute.meta.keepAlive,starter默认开启保活,所以meta.keepAlive未定义时也需要进行保活,只有显式说明false才禁用保活。 const needAlive = !ignoreCacheRoutes.includes(newRoute.name as string); if (!this.tabRouters.find((route: TRouterInfo) => route.path === newRoute.path)) { this.tabRouterList = this.tabRouterList.concat({ ...newRoute, isAlive: needAlive });