Commit 836672d9 authored by 张伯涛's avatar 张伯涛

测试

parent b011dfcc
......@@ -81,6 +81,8 @@ export default {
}
},
hasOneShowingChild(children = [], parent) {
console.log('children', children)
console.log('parent', parent)
const showingChildren = children.filter(item => {
if (item.hidden) {
return false
......@@ -92,11 +94,13 @@ export default {
})
// When there is only one child router, the child router is displayed by default
console.log('showingChildren', showingChildren)
if (showingChildren.length === 1) {
if (showingChildren[0].path === '/Home') {
return true
}
return false
// if (showingChildren[0].path === '/Home') {
// return true
// }
// return false
return true
}
// Show parent if there are no child router to display
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment