fix: 路由父级的记录改为全局 修复点击选项卡X无法跳转到正确来源的bug
This commit is contained in:
@ -184,7 +184,7 @@ export const useMultipleTabStore = defineStore({
|
||||
}
|
||||
},
|
||||
|
||||
async closeTab(tab: RouteLocationNormalized, router: Router, backTo: String) {
|
||||
async closeTab(tab: RouteLocationNormalized, router: Router) {
|
||||
const close = (route: RouteLocationNormalized) => {
|
||||
const { fullPath, meta: { affix } = {} } = route;
|
||||
if (affix) {
|
||||
@ -207,6 +207,8 @@ export const useMultipleTabStore = defineStore({
|
||||
let toTarget: RouteLocationRaw = {};
|
||||
|
||||
const index = this.tabList.findIndex((item) => item.path === path);
|
||||
const backTo = window.fcd.routeBackMapping[tab.path];
|
||||
delete window.fcd.routeBackMapping[tab.path];
|
||||
const backToIndex = backTo ? this.tabList.findIndex((item) => item.path === backTo) : -1;
|
||||
|
||||
// If the current is the leftmost tab
|
||||
|
||||
Reference in New Issue
Block a user