Merge pull request #180 from SadWood/develop

fix: 首页TAB触发关闭其他异常
This commit is contained in:
yuyang 2022-06-21 17:22:37 +08:00 committed by GitHub
commit 6bb22945e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -55,10 +55,10 @@
"lint-staged": "^12.1.2",
"mockjs": "^1.1.0",
"prettier": "^2.4.1",
"stylelint": "^13.13.1",
"stylelint-config-prettier": "^9.0.3",
"stylelint-less": "^1.0.1",
"stylelint-order": "^4.1.0",
"stylelint": "~13.13.1",
"stylelint-config-prettier": "~9.0.3",
"stylelint-less": "1.0.1",
"stylelint-order": "~4.1.0",
"typescript": "~4.4.3",
"vite": "^2.7.1",
"vite-plugin-mock": "^2.9.6",

View File

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