refine sidebar css

This commit is contained in:
Pan 2017-05-08 11:00:08 +08:00
parent c0d4402ecd
commit 2f69f13ae1
1 changed files with 9 additions and 10 deletions

View File

@ -3,22 +3,17 @@
<template v-for="item in permissionRoutes" v-if="!item.hidden">
<el-submenu :index="item.name" v-if="!item.noDropdown">
<template slot="title">
<wscn-icon-svg :icon-class="item.icon||'wenzhang1'"/>
{{item.name}}
<wscn-icon-svg :icon-class="item.icon||'wenzhang1'" /> {{item.name}}
</template>
<router-link v-for="child in item.children" :key="child.path" v-if="!child.hidden"
class="title-link" :to="item.path+'/'+child.path">
<router-link v-for="child in item.children" :key="child.path" v-if="!child.hidden" class="title-link" :to="item.path+'/'+child.path">
<el-menu-item :index="item.path+'/'+child.path">
{{child.name}}
</el-menu-item>
</router-link>
</el-submenu>
<router-link v-if="item.noDropdown&&item.children.length>0" class="title-link"
:to="item.path+'/'+item.children[0].path">
<el-menu-item
:index="item.path+'/'+item.children[0].path">
<wscn-icon-svg :icon-class="item.icon||'geren1'"/>
{{item.children[0].name}}
<router-link v-if="item.noDropdown&&item.children.length>0" :to="item.path+'/'+item.children[0].path">
<el-menu-item :index="item.path+'/'+item.children[0].path">
<wscn-icon-svg :icon-class="item.icon||'geren1'" /> {{item.children[0].name}}
</el-menu-item>
</router-link>
</template>
@ -44,4 +39,8 @@
.wscn-icon {
margin-right: 10px;
}
.hideSidebar .title-link{
display: inline-block;
padding-left: 10px;
}
</style>