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

修改

parent 836672d9
...@@ -96,11 +96,10 @@ export default { ...@@ -96,11 +96,10 @@ export default {
// When there is only one child router, the child router is displayed by default // When there is only one child router, the child router is displayed by default
console.log('showingChildren', showingChildren) console.log('showingChildren', showingChildren)
if (showingChildren.length === 1) { if (showingChildren.length === 1) {
// if (showingChildren[0].path === '/Home') { if (showingChildren[0].path === '/Home') {
// return true return true
// } }
// return false return false
return true
} }
// Show parent if there are no child router to display // Show parent if there are no child router to display
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
:collapse-transition="false" :collapse-transition="false"
mode="vertical" 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-menu>
</el-scrollbar> </el-scrollbar>
</div> </div>
...@@ -51,6 +51,9 @@ export default { ...@@ -51,6 +51,9 @@ export default {
return !this.sidebar.opened return !this.sidebar.opened
} }
}, },
mounted() {
console.log('啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊', this.permission_routes)
},
methods: { methods: {
closeMenu() { closeMenu() {
this.$refs.myMenu.close(this.$refs.myMenu.openedMenus[0]) 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