Skip to content

Commit 6bb2294

Browse files
authored
Merge pull request #180 from SadWood/develop
fix: 首页TAB触发关闭其他异常
2 parents fa1e54a + f487203 commit 6bb2294

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@
5555
"lint-staged": "^12.1.2",
5656
"mockjs": "^1.1.0",
5757
"prettier": "^2.4.1",
58-
"stylelint": "^13.13.1",
59-
"stylelint-config-prettier": "^9.0.3",
60-
"stylelint-less": "^1.0.1",
61-
"stylelint-order": "^4.1.0",
58+
"stylelint": "~13.13.1",
59+
"stylelint-config-prettier": "~9.0.3",
60+
"stylelint-less": "1.0.1",
61+
"stylelint-order": "~4.1.0",
6262
"typescript": "~4.4.3",
6363
"vite": "^2.7.1",
6464
"vite-plugin-mock": "^2.9.6",

src/store/modules/tabs-router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const useTabsRouterStore = defineStore('tabsRouter', {
5959
// 处理关闭其他
6060
subtractTabRouterOther(newRoute: TRouterInfo) {
6161
const { routeIdx } = newRoute;
62-
this.tabRouterList = homeRoute.concat([this.tabRouterList?.[routeIdx]]);
62+
this.tabRouterList = routeIdx === 0 ? homeRoute : homeRoute.concat([this.tabRouterList?.[routeIdx]]);
6363
},
6464
removeTabRouterList() {
6565
this.tabRouterList = [];

0 commit comments

Comments
 (0)