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 })