优化代码

This commit is contained in:
RuoYi
2024-11-25 22:20:30 +08:00
parent f8c4968b33
commit 6061c3548f
5 changed files with 15 additions and 14 deletions

View File

@@ -57,11 +57,9 @@ function hasOneShowingChild(children = [], parent) {
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
} else {
// Temp set(will be used if only has one showing child)
onlyOneChild.value = item
return true
}
onlyOneChild.value = item
return true
})
// When there is only one child router, the child router is displayed by default