|
@@ -79,6 +79,7 @@
|
|
|
v-for="(menuitem, index) in menu.children"
|
|
|
:key="index"
|
|
|
class="elsubMenu"
|
|
|
+ :class="getSelectState(menuitem.index)"
|
|
|
>
|
|
|
<el-menu-item :index="menuitem.index" class="grounpItem">
|
|
|
<!-- <span class="grounpItemSty"></span> -->
|
|
@@ -627,14 +628,15 @@ export default {
|
|
|
console.log("离开标记", this.socketLeaveFlag);
|
|
|
},
|
|
|
methods: {
|
|
|
- getSelectState() {
|
|
|
- // routepath === $route.path ? 'isSelect' : ''
|
|
|
+ getSelectState(idx) {
|
|
|
+ // routepath === $route.path ? 'isSelect' : ''
|
|
|
const href = window.location.href;
|
|
|
const path = this.$route.path;
|
|
|
|
|
|
const reg = new RegExp(path);
|
|
|
|
|
|
- return path !== "/" && reg.test(href) ? "isSelect" : "";
|
|
|
+ // return idx !== "/" && reg.test(path) ? "isSelect" : "";
|
|
|
+ return idx !== "/" && path.indexOf(idx) !== -1 ? "isSelect" : "";
|
|
|
},
|
|
|
initMenu() {
|
|
|
let str = window.location.href;
|
|
@@ -1324,6 +1326,12 @@ body {
|
|
|
// }
|
|
|
// }
|
|
|
}
|
|
|
+ .isSelect{
|
|
|
+ background: #1c69bb;
|
|
|
+ .grounpItemSpan{
|
|
|
+ color: #a5b7df;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|