|
@@ -23,17 +23,19 @@
|
|
|
<el-aside class="left-aside" width="210px">
|
|
<el-aside class="left-aside" width="210px">
|
|
|
<el-menu :default-active="$route.path" router class="left-menue" active-text-color="#ffffff">
|
|
<el-menu :default-active="$route.path" router class="left-menue" active-text-color="#ffffff">
|
|
|
<template v-for="(item, index) in $router.options.routes">
|
|
<template v-for="(item, index) in $router.options.routes">
|
|
|
- <el-menu-item v-if='item.show&&item.children.length<=1' :index="item.path" :key='index'>
|
|
|
|
|
|
|
+ <el-menu-item v-if='item.show&&item.isLeaf' :index="item.path" :key='index'>
|
|
|
<i class="el-icon-menu"></i>
|
|
<i class="el-icon-menu"></i>
|
|
|
<span slot="title">{{item.name}}</span>
|
|
<span slot="title">{{item.name}}</span>
|
|
|
</el-menu-item>
|
|
</el-menu-item>
|
|
|
- <el-submenu v-if='item.show&&item.children.length>1' :index="item.path" :key='index'>
|
|
|
|
|
|
|
+ <el-submenu v-if='item.show&&!item.isLeaf' :index="item.path" :key='index'>
|
|
|
<template slot="title">
|
|
<template slot="title">
|
|
|
<i class="el-icon-location"></i>
|
|
<i class="el-icon-location"></i>
|
|
|
<span>{{item.name}}</span>
|
|
<span>{{item.name}}</span>
|
|
|
</template>
|
|
</template>
|
|
|
- <el-menu-item-group v-for="(idx,child) in item.children" :key="index+'_'+idx">
|
|
|
|
|
- <el-menu-item :index="child.path">{{child.name}}</el-menu-item>
|
|
|
|
|
|
|
+ <el-menu-item-group >
|
|
|
|
|
+ <el-menu-item v-for="(child,idx) in item.children" :key="index+'_'+idx" :index="child.path">
|
|
|
|
|
+ {{child.name}}
|
|
|
|
|
+ </el-menu-item>
|
|
|
</el-menu-item-group>
|
|
</el-menu-item-group>
|
|
|
</el-submenu>
|
|
</el-submenu>
|
|
|
</template>
|
|
</template>
|