Skip to content

Commit 2f69f13

Browse files
committed
refine sidebar css
1 parent c0d4402 commit 2f69f13

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

src/views/layout/Sidebar.vue

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,17 @@
33
<template v-for="item in permissionRoutes" v-if="!item.hidden">
44
<el-submenu :index="item.name" v-if="!item.noDropdown">
55
<template slot="title">
6-
<wscn-icon-svg :icon-class="item.icon||'wenzhang1'"/>
7-
{{item.name}}
6+
<wscn-icon-svg :icon-class="item.icon||'wenzhang1'" /> {{item.name}}
87
</template>
9-
<router-link v-for="child in item.children" :key="child.path" v-if="!child.hidden"
10-
class="title-link" :to="item.path+'/'+child.path">
8+
<router-link v-for="child in item.children" :key="child.path" v-if="!child.hidden" class="title-link" :to="item.path+'/'+child.path">
119
<el-menu-item :index="item.path+'/'+child.path">
1210
{{child.name}}
1311
</el-menu-item>
1412
</router-link>
1513
</el-submenu>
16-
<router-link v-if="item.noDropdown&&item.children.length>0" class="title-link"
17-
:to="item.path+'/'+item.children[0].path">
18-
<el-menu-item
19-
:index="item.path+'/'+item.children[0].path">
20-
<wscn-icon-svg :icon-class="item.icon||'geren1'"/>
21-
{{item.children[0].name}}
14+
<router-link v-if="item.noDropdown&&item.children.length>0" :to="item.path+'/'+item.children[0].path">
15+
<el-menu-item :index="item.path+'/'+item.children[0].path">
16+
<wscn-icon-svg :icon-class="item.icon||'geren1'" /> {{item.children[0].name}}
2217
</el-menu-item>
2318
</router-link>
2419
</template>
@@ -44,4 +39,8 @@
4439
.wscn-icon {
4540
margin-right: 10px;
4641
}
42+
.hideSidebar .title-link{
43+
display: inline-block;
44+
padding-left: 10px;
45+
}
4746
</style>

0 commit comments

Comments
 (0)