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