Skip to content

Commit

Permalink
fix(store): addTab fx (#607)
Browse files Browse the repository at this point in the history
在更新tabList的时候也能同时更新cacheTab
  • Loading branch information
hyperq authored May 17, 2021
1 parent adff788 commit 336be68
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/store/modules/multipleTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ export const useMultipleTabStore = defineStore({
curTab.query = query || curTab.query;
curTab.fullPath = fullPath || curTab.fullPath;
this.tabList.splice(updateIndex, 1, curTab);
return;
} else {
// Add tab
this.tabList.push(route);
}
// Add tab
this.tabList.push(route);
this.updateCacheTab();
cacheTab && Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList);
},
Expand Down

0 comments on commit 336be68

Please sign in to comment.