Commit a1283c13222b637e9578fe1758beb2b3846ec620
Committed by
GitHub
1 parent
cc88e1a6
fix:关闭其它页签需要使用fullPath来判断,更新缓存后需要同时更新localStorage,否则刷新页面页签会再次加载 (#2847)
* fixed:修复操作页签后 打开页面需要使用fullPath,否则可能会导致参数丢失引起数据加载异常。 * fix:关闭其它页签需要使用fullPath来判断,更新缓存后需要同时更新localStorage,否则刷新页面页签会再次加载 --------- Co-authored-by: lichi <lichi@ilinecn.com>
Showing
1 changed file
with
2 additions
and
1 deletions
src/store/modules/multipleTab.ts
... | ... | @@ -308,7 +308,7 @@ export const useMultipleTabStore = defineStore({ |
308 | 308 | |
309 | 309 | for (const path of closePathList) { |
310 | 310 | if (path !== route.fullPath) { |
311 | - const closeItem = this.tabList.find((item) => item.path === path); | |
311 | + const closeItem = this.tabList.find((item) => item.fullPath === path); | |
312 | 312 | if (!closeItem) { |
313 | 313 | continue; |
314 | 314 | } |
... | ... | @@ -320,6 +320,7 @@ export const useMultipleTabStore = defineStore({ |
320 | 320 | } |
321 | 321 | this.bulkCloseTabs(pathList); |
322 | 322 | this.updateCacheTab(); |
323 | + Persistent.setLocal(MULTIPLE_TABS_KEY, this.tabList, true) | |
323 | 324 | handleGotoPage(router); |
324 | 325 | }, |
325 | 326 | ... | ... |