Browse Source
Merge pull request #3987 from mrmsl/main
chore(multipleTab): Make the code more readable
pull/3991/head
vince
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
src/store/modules/multipleTab.ts
|
|
@ -160,7 +160,7 @@ export const useMultipleTabStore = defineStore({ |
|
|
const realPath = meta?.realPath ?? ''; |
|
|
const realPath = meta?.realPath ?? ''; |
|
|
// 获取到已经打开的动态路由数, 判断是否大于某一个值
|
|
|
// 获取到已经打开的动态路由数, 判断是否大于某一个值
|
|
|
if ( |
|
|
if ( |
|
|
this.tabList.filter((e) => e.meta?.realPath ?? '' === realPath).length >= dynamicLevel |
|
|
this.tabList.filter((e) => (e.meta?.realPath ?? '') === realPath).length >= dynamicLevel |
|
|
) { |
|
|
) { |
|
|
// 关闭第一个
|
|
|
// 关闭第一个
|
|
|
const index = this.tabList.findIndex((item) => item.meta.realPath === realPath); |
|
|
const index = this.tabList.findIndex((item) => item.meta.realPath === realPath); |
|
|
|