From 1dd29dd78a5cfdc6acd5d09c7bdf488f2e46d8a2 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Mon, 22 Apr 2024 19:36:14 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=88=B7=E6=96=B0=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E4=BF=9D=E7=95=99=E6=89=80=E6=9C=89=20tabs=20?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Tabs/index.vue | 2 +- src/stores/modules/tabs.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout/components/Tabs/index.vue b/src/layout/components/Tabs/index.vue index cb95cfd..398037e 100644 --- a/src/layout/components/Tabs/index.vue +++ b/src/layout/components/Tabs/index.vue @@ -51,7 +51,7 @@ const appStore = useAppStore() const tabsStore = useTabsStore() // 重置, 同时把 affix: true 的路由筛选出来 -tabsStore.reset() +// tabsStore.reset() // 监听路由变化 watch( diff --git a/src/stores/modules/tabs.ts b/src/stores/modules/tabs.ts index 4fd0d06..0867ef6 100644 --- a/src/stores/modules/tabs.ts +++ b/src/stores/modules/tabs.ts @@ -112,4 +112,4 @@ const storeSetup = () => { } } -export const useTabsStore = defineStore('tabs', storeSetup, { persist: false }) +export const useTabsStore = defineStore('tabs', storeSetup, { persist: true })