fix issues-179

This commit is contained in:
SadWood 2022-06-21 14:30:38 +08:00 committed by GitHub
parent fa1e54a12f
commit 960d537e7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,7 @@ export const useTabsRouterStore = defineStore('tabsRouter', {
// 处理关闭其他 // 处理关闭其他
subtractTabRouterOther(newRoute: TRouterInfo) { subtractTabRouterOther(newRoute: TRouterInfo) {
const { routeIdx } = newRoute; const { routeIdx } = newRoute;
this.tabRouterList = homeRoute.concat([this.tabRouterList?.[routeIdx]]); this.tabRouterList = routeIdx === 0 ? homeRoute : homeRoute.concat([this.tabRouterList?.[routeIdx]]);
}, },
removeTabRouterList() { removeTabRouterList() {
this.tabRouterList = []; this.tabRouterList = [];