Browse Source

等待prelement subMenu bug

main
pixelqm 5 years ago
parent
commit
7f4352c6b4
  1. 4
      QMPlusVuePage/src/view/layout/aside/asideComponent/asyncSubmenu.vue
  2. 6
      QMPlusVuePage/src/view/layout/aside/asideComponent/index.vue
  3. 4
      QMPlusVuePage/src/view/layout/aside/index.vue

4
QMPlusVuePage/src/view/layout/aside/asideComponent/submenu.vue → QMPlusVuePage/src/view/layout/aside/asideComponent/asyncSubmenu.vue

@ -1,5 +1,5 @@
<template> <template>
<el-submenu :index="routerInfo.name">
<el-submenu ref="subMenu" :index="routerInfo.name">
<template slot="title"> <template slot="title">
<i class="el-icon-location"></i> <i class="el-icon-location"></i>
<span slot="title">{{routerInfo.meta.title}}</span> <span slot="title">{{routerInfo.meta.title}}</span>
@ -10,7 +10,7 @@
<script> <script>
export default { export default {
name: 'SubMenu',
name: 'AsyncSubmenu',
props: { props: {
routerInfo: { routerInfo: {
default: function() { default: function() {

6
QMPlusVuePage/src/view/layout/aside/asideComponent/index.vue

@ -8,14 +8,14 @@
<script> <script>
import MenuItem from './menuItem' import MenuItem from './menuItem'
import SubMenu from './submenu'
import AsyncSubmenu from './asyncSubmenu'
export default { export default {
name: 'AsideComponent', name: 'AsideComponent',
computed:{ computed:{
menuComponent(){ menuComponent(){
if(this.routerInfo.children.length){ if(this.routerInfo.children.length){
return 'SubMenu'
return 'AsyncSubmenu'
}else{ }else{
return 'MenuItem' return 'MenuItem'
} }
@ -31,7 +31,7 @@ export default {
}, },
components: { components: {
MenuItem, MenuItem,
SubMenu
AsyncSubmenu
} }
} }
</script> </script>

4
QMPlusVuePage/src/view/layout/aside/index.vue

@ -6,7 +6,7 @@
@select="selectMenuItem" @select="selectMenuItem"
unique-opened unique-opened
> >
<AsideComponent :key="item.name" :routerInfo="item" v-for="item in asyncRouters[0].children" />
<aside-component :key="item.name" :routerInfo="item" v-for="item in asyncRouters[0].children" />
</el-menu> </el-menu>
</template> </template>
@ -18,7 +18,7 @@ export default {
data() { data() {
return { return {
active: '', active: '',
isCollapse: true
isCollapse: false
} }
}, },
methods: { methods: {

Loading…
Cancel
Save