Commit a85e2835 authored by 张伯涛's avatar 张伯涛

修改

parent 836672d9
......@@ -96,12 +96,11 @@ 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
}
// Show parent if there are no child router to display
if (showingChildren.length === 0) {
......
......@@ -13,7 +13,7 @@
:collapse-transition="false"
mode="vertical"
>
<sidebar-item v-for="(route, index) in permission_routes" :collapse="isCollapse" :key="index" :item="route" :base-path="route.path" @closeMenu="closeMenu"/>
<sidebar-item v-for="(route, index) in permission_routes" :key="index" :collapse="isCollapse" :item="route" :base-path="route.path" @closeMenu="closeMenu" />
</el-menu>
</el-scrollbar>
</div>
......@@ -51,6 +51,9 @@ export default {
return !this.sidebar.opened
}
},
mounted() {
console.log('啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊', this.permission_routes)
},
methods: {
closeMenu() {
this.$refs.myMenu.close(this.$refs.myMenu.openedMenus[0])
......
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