menu 支持 icon 嵌套
This commit is contained in:
parent
fa9a3e0ba5
commit
a34bc26ff1
File diff suppressed because one or more lines are too long
|
@ -102,6 +102,7 @@ export const asyncRouterMap = [
|
||||||
component: _import('example/table/index'),
|
component: _import('example/table/index'),
|
||||||
redirect: '/example/table/table',
|
redirect: '/example/table/table',
|
||||||
name: 'Table',
|
name: 'Table',
|
||||||
|
icon: 'table',
|
||||||
children: [
|
children: [
|
||||||
{ path: 'dynamictable', component: _import('example/table/dynamictable'), name: '动态table' },
|
{ path: 'dynamictable', component: _import('example/table/dynamictable'), name: '动态table' },
|
||||||
{ path: 'dragtable', component: _import('example/table/dragTable'), name: '拖拽table' },
|
{ path: 'dragtable', component: _import('example/table/dragTable'), name: '拖拽table' },
|
||||||
|
@ -109,10 +110,10 @@ export const asyncRouterMap = [
|
||||||
{ path: 'table', component: _import('example/table/table'), name: '综合table' }
|
{ path: 'table', component: _import('example/table/table'), name: '综合table' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{ path: 'form/edit', component: _import('example/form'), name: '编辑Form', meta: { isEdit: true } },
|
{ path: 'form/edit', icon: 'ziliaoshouce', component: _import('example/form'), name: '编辑Form', meta: { isEdit: true } },
|
||||||
{ path: 'form/create', component: _import('example/form'), name: '创建Form' },
|
{ path: 'form/create', icon: 'yinhangqia', component: _import('example/form'), name: '创建Form' },
|
||||||
|
|
||||||
{ path: 'tab/index', component: _import('example/tab/index'), name: 'Tab' }
|
{ path: 'tab/index', icon: 'mobankuangjia', component: _import('example/tab/index'), name: 'Tab' }
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -7,17 +7,13 @@
|
||||||
margin-right: 16px;
|
margin-right: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideSidebar .svg-icon {
|
|
||||||
margin-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.hideSidebar .el-submenu>.el-submenu__title,
|
.hideSidebar .el-submenu>.el-submenu__title,
|
||||||
.hideSidebar .submenu-title-noDropdown {
|
.hideSidebar .submenu-title-noDropdown {
|
||||||
padding-left: 10px!important;
|
padding-left: 10px!important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hideSidebar .submenu-title-noDropdown span,
|
.hideSidebar .submenu-title-noDropdown span,
|
||||||
.hideSidebar .el-submenu>.el-submenu__title span {
|
.hideSidebar .el-submenu>.el-submenu__title>span {
|
||||||
height: 0;
|
height: 0;
|
||||||
width: 0;
|
width: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -32,6 +28,7 @@
|
||||||
height: auto;
|
height: auto;
|
||||||
width: auto;
|
width: auto;
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
.el-submenu__icon-arrow {
|
.el-submenu__icon-arrow {
|
||||||
display: block!important;
|
display: block!important;
|
||||||
|
@ -65,6 +62,8 @@
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: -145px;
|
right: -145px;
|
||||||
|
text-align: left;
|
||||||
|
text-indent: 20px;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
background-color: #1f2d3d;
|
background-color: #1f2d3d;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
|
@ -51,9 +51,6 @@
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 1001;
|
z-index: 1001;
|
||||||
background: red;
|
background: red;
|
||||||
// overflow-y: auto;
|
|
||||||
&::-webkit-scrollbar {display:none}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.main-container {
|
.main-container {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<el-submenu :index="item.name" v-if="!item.noDropdown&&!item.hidden">
|
<el-submenu :index="item.name" v-if="!item.noDropdown&&!item.hidden">
|
||||||
<template slot="title">
|
<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>
|
||||||
<template v-for="child in item.children" v-if='!child.hidden'>
|
<template v-for="child in item.children" v-if='!child.hidden'>
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
<router-link v-else :to="item.path+'/'+child.path">
|
<router-link v-else :to="item.path+'/'+child.path">
|
||||||
<el-menu-item :index="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>
|
</el-menu-item>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue