Unverified 提交 336be680 作者: HUCHAOQI 提交者: GitHub

fix(store): addTab fx (#607)

在更新tabList的时候也能同时更新cacheTab
上级 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 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论