menu 支持 icon 嵌套
This commit is contained in:
parent
69fc52d4e9
commit
108b380d20
4 changed files with 7 additions and 11 deletions
File diff suppressed because one or more lines are too long
|
@ -7,17 +7,13 @@
|
|||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.hideSidebar .svg-icon {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.hideSidebar .el-submenu>.el-submenu__title,
|
||||
.hideSidebar .submenu-title-noDropdown {
|
||||
padding-left: 10px!important;
|
||||
}
|
||||
|
||||
.hideSidebar .submenu-title-noDropdown span,
|
||||
.hideSidebar .el-submenu>.el-submenu__title span {
|
||||
.hideSidebar .el-submenu>.el-submenu__title>span {
|
||||
height: 0;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
|
@ -32,6 +28,7 @@
|
|||
height: auto;
|
||||
width: auto;
|
||||
visibility: visible;
|
||||
display: inline;
|
||||
}
|
||||
.el-submenu__icon-arrow {
|
||||
display: block!important;
|
||||
|
@ -65,6 +62,8 @@
|
|||
visibility: visible;
|
||||
position: absolute;
|
||||
right: -145px;
|
||||
text-align: left;
|
||||
text-indent: 20px;
|
||||
top: 0px;
|
||||
background-color: #1f2d3d;
|
||||
opacity: 1;
|
||||
|
|
|
@ -51,9 +51,6 @@
|
|||
left: 0;
|
||||
z-index: 1001;
|
||||
background: red;
|
||||
// overflow-y: auto;
|
||||
&::-webkit-scrollbar {display:none}
|
||||
|
||||
}
|
||||
.main-container {
|
||||
min-height: 100%;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
<el-submenu :index="item.name" v-if="!item.noDropdown&&!item.hidden">
|
||||
<template slot="title">
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg><span slot="title">{{item.name}}</span>
|
||||
<icon-svg v-if='item.icon' :icon-class="item.icon"></icon-svg><span>{{item.name}}</span>
|
||||
</template>
|
||||
<template v-for="child in item.children" v-if='!child.hidden'>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
|||
|
||||
<router-link v-else :to="item.path+'/'+child.path">
|
||||
<el-menu-item :index="item.path+'/'+child.path">
|
||||
<span slot="title">{{child.name}}</span>
|
||||
<icon-svg v-if='child.icon' :icon-class="child.icon"></icon-svg><span>{{child.name}}</span>
|
||||
</el-menu-item>
|
||||
</router-link>
|
||||
|
||||
|
|
Loading…
Reference in a new issue