File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 3
3
<template v-for =" item in routes " v-if =" ! item .hidden && item .children " >
4
4
5
5
<router-link v-if =" item.children.length===1 && !item.children[0].children" :to =" item.path+'/'+item.children[0].path" :key =" item.children[0].name" >
6
- <el-menu-item :index =" item.path+'/'+item.children[0].path" class =' submenu-title-noDropdown' >
6
+ <el-menu-item :index =" item.path+'/'+item.children[0].path" : class =" { 'submenu-title-noDropdown':!isNest} " >
7
7
<svg-icon v-if =" item.children[0].meta&&item.children[0].meta.icon" :icon-class =" item.children[0].meta.icon" ></svg-icon >
8
8
<span v-if =" item.children[0].meta&&item.children[0].meta.title" >{{generateTitle(item.children[0].meta.title)}}</span >
9
9
</el-menu-item >
16
16
</template >
17
17
18
18
<template v-for =" child in item .children " v-if =" ! child .hidden " >
19
- <sidebar-item class =" nest-menu" v-if =" child.children&&child.children.length>0" :routes =" [child]" :key =" child.path" ></sidebar-item >
19
+ <sidebar-item :is-nest = " true " class =" nest-menu" v-if =" child.children&&child.children.length>0" :routes =" [child]" :key =" child.path" ></sidebar-item >
20
20
21
21
<router-link v-else :to =" item.path+'/'+child.path" :key =" child.name" >
22
22
<el-menu-item :index =" item.path+'/'+child.path" >
@@ -39,6 +39,10 @@ export default {
39
39
props: {
40
40
routes: {
41
41
type: Array
42
+ },
43
+ isNest: {
44
+ type: Boolean ,
45
+ default: false
42
46
}
43
47
},
44
48
methods: {
You can’t perform that action at this time.
0 commit comments