|
@@ -18,7 +18,7 @@
|
|
</template>
|
|
</template>
|
|
</el-menu-item>
|
|
</el-menu-item>
|
|
</el-menu>
|
|
</el-menu>
|
|
- <div v-show="isShow" class="subsidemenu">
|
|
|
|
|
|
+ <div v-show="isShow && activeName!== '首页'" class="subsidemenu">
|
|
<div class="menu-header">{{selectItem.title}}</div>
|
|
<div class="menu-header">{{selectItem.title}}</div>
|
|
<ul class="menu-item-children">
|
|
<ul class="menu-item-children">
|
|
<li
|
|
<li
|
|
@@ -39,7 +39,7 @@
|
|
:default-active="routerName"
|
|
:default-active="routerName"
|
|
:active-text-color="color">
|
|
:active-text-color="color">
|
|
<template v-for="item in menuList">
|
|
<template v-for="item in menuList">
|
|
- <el-submenu :key="item.id" v-if="item.children.length > 0" :index="item.url">
|
|
|
|
|
|
+ <el-submenu :key="item.id" v-if="item.children.length > 0 && item.url !== 'dashboard'" :index="item.url">
|
|
<span slot="title">{{item.title}}</span>
|
|
<span slot="title">{{item.title}}</span>
|
|
<el-menu-item v-for="list in item.children" :key="list.id" :index="list.url">{{list.title}}</el-menu-item>
|
|
<el-menu-item v-for="list in item.children" :key="list.id" :index="list.url">{{list.title}}</el-menu-item>
|
|
</el-submenu>
|
|
</el-submenu>
|
|
@@ -99,20 +99,24 @@ export default {
|
|
let parentName = this.$route.meta.parentName;
|
|
let parentName = this.$route.meta.parentName;
|
|
if(newVal) {
|
|
if(newVal) {
|
|
this.selectItem = this.getFilter(this.menuList, parentName)[0];
|
|
this.selectItem = this.getFilter(this.menuList, parentName)[0];
|
|
|
|
+ this.activeUrl = routerName;
|
|
|
|
+ this.activeName = parentName;
|
|
if (this.selectItem.children.length > 0) {
|
|
if (this.selectItem.children.length > 0) {
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
} else {
|
|
} else {
|
|
this.isShow = false;
|
|
this.isShow = false;
|
|
}
|
|
}
|
|
- this.activeUrl = routerName;
|
|
|
|
- this.activeName = parentName;
|
|
|
|
} else {
|
|
} else {
|
|
this.routerName = routerName;
|
|
this.routerName = routerName;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
isShow(newVal) {
|
|
isShow(newVal) {
|
|
if(newVal) {
|
|
if(newVal) {
|
|
- this.width = 100;
|
|
|
|
|
|
+ if(this.activeName === '首页') {
|
|
|
|
+ this.width = 249;
|
|
|
|
+ } else {
|
|
|
|
+ this.width = 100;
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.width = 249;
|
|
this.width = 249;
|
|
}
|
|
}
|
|
@@ -137,13 +141,12 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
jump(item) {
|
|
jump(item) {
|
|
|
|
+ console.log(item);
|
|
this.activeName = item.title;
|
|
this.activeName = item.title;
|
|
- if(item.children.length > 0) {
|
|
|
|
- // this.width = 100;
|
|
|
|
|
|
+ if(item.children.length > 0 && item.url !== "dashboard") {
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
this.selectItem = item;
|
|
this.selectItem = item;
|
|
} else {
|
|
} else {
|
|
- // this.width = 249;
|
|
|
|
this.isShow = false;
|
|
this.isShow = false;
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/' + item.url
|
|
path: '/' + item.url
|
|
@@ -243,7 +246,7 @@ export default {
|
|
width: 18px;
|
|
width: 18px;
|
|
height: 18px;
|
|
height: 18px;
|
|
top: 20px;
|
|
top: 20px;
|
|
- right: -10px;
|
|
|
|
|
|
+ left: 92px;
|
|
transform: rotate(45deg);
|
|
transform: rotate(45deg);
|
|
background-color: #EAEDF1;
|
|
background-color: #EAEDF1;
|
|
|
|
|