Browse Source

fix(store): addTab fx (#607)

在更新tabList的时候也能同时更新cacheTab
pull/613/head
HUCHAOQI 5 years ago
committed by GitHub
parent
commit
336be680d3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/store/modules/multipleTab.ts

6
src/store/modules/multipleTab.ts

@ -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);
},

Loading…
Cancel
Save