Unverified Commit 336be680 authored by HUCHAOQI's avatar HUCHAOQI Committed by GitHub

fix(store): addTab fx (#607)

在更新tabList的时候也能同时更新cacheTab
parent adff788d
...@@ -136,10 +136,10 @@ export const useMultipleTabStore = defineStore({ ...@@ -136,10 +136,10 @@ export const useMultipleTabStore = defineStore({
curTab.query = query || curTab.query; curTab.query = query || curTab.query;
curTab.fullPath = fullPath || curTab.fullPath; curTab.fullPath = fullPath || curTab.fullPath;
this.tabList.splice(updateIndex, 1, curTab); this.tabList.splice(updateIndex, 1, curTab);
return; } else {
// Add tab
this.tabList.push(route);
} }
// Add tab
this.tabList.push(route);
this.updateCacheTab(); this.updateCacheTab();
cacheTab && Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList); cacheTab && Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList);
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment