fix:关闭其它页签需要使用fullPath来判断,更新缓存后需要同时更新localStorage,否则刷新页面页签会再次加载 (#2847)

* fixed:修复操作页签后 打开页面需要使用fullPath,否则可能会导致参数丢失引起数据加载异常。

* fix:关闭其它页签需要使用fullPath来判断,更新缓存后需要同时更新localStorage,否则刷新页面页签会再次加载

---------

Co-authored-by: lichi <lichi@ilinecn.com>
This commit is contained in:
Norton
2023-06-10 09:12:20 +08:00
committed by GitHub
parent cc88e1a66c
commit a1283c1322

View File

@@ -308,7 +308,7 @@ export const useMultipleTabStore = defineStore({
for (const path of closePathList) {
if (path !== route.fullPath) {
const closeItem = this.tabList.find((item) => item.path === path);
const closeItem = this.tabList.find((item) => item.fullPath === path);
if (!closeItem) {
continue;
}
@@ -320,6 +320,7 @@ export const useMultipleTabStore = defineStore({
}
this.bulkCloseTabs(pathList);
this.updateCacheTab();
Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList, true)
handleGotoPage(router);
},