|
@@ -4,7 +4,11 @@
|
|
|
<el-row class="sidebar">
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="first">
|
|
|
- <el-menu class="sidebar-el-menu" :default-active="onRoutes" unique-opened router
|
|
|
+ <el-menu
|
|
|
+ class="sidebar-el-menu"
|
|
|
+ :default-active="onRoutes"
|
|
|
+ unique-opened
|
|
|
+ router
|
|
|
:background-color="styleInfo.backColor" :text-color="styleInfo.textColor"
|
|
|
:active-text-color="styleInfo.activeColor">
|
|
|
<template v-for="item in items">
|
|
@@ -17,8 +21,7 @@
|
|
|
<template v-for="subItem in item.children">
|
|
|
<!-- TODO:这里有问题需要改成自引用输出方式.实现无线嵌套.目前只是最多三级 -->
|
|
|
<template v-if="subItem.type === '0'">
|
|
|
- <el-sub-menu v-if="subItem.children && subItem.children.length > 0" :index="subItem._id"
|
|
|
- :key="subItem._id">
|
|
|
+ <el-sub-menu v-if="subItem.children && subItem.children.length > 0" :index="subItem._id" :key="subItem._id">
|
|
|
<template #title>
|
|
|
<i :class="['iconfont', subItem.icon]"></i>
|
|
|
<span>{{ subItem.name }}</span>
|
|
@@ -91,11 +94,6 @@ watch(
|
|
|
.sidebar::-webkit-scrollbar {
|
|
|
width: 0;
|
|
|
}
|
|
|
-
|
|
|
-.sidebar-el-menu:not(.el-menu--collapse) {
|
|
|
- // width: 200px;
|
|
|
-}
|
|
|
-
|
|
|
.sidebar>ul {
|
|
|
height: 100%;
|
|
|
}
|