|
@@ -10,9 +10,22 @@
|
|
|
<div class="page-common-body-menu-border left bottom"></div>
|
|
|
<div class="page-common-body-menu-border right top"></div>
|
|
|
<div class="page-common-body-menu-border right bottom"></div>
|
|
|
- <router-link v-for="(menuData, index) of menuDatas" :key="index" :to="menuData.path">
|
|
|
- <div class="page-common-body-menu-item" @click="clickMenu(index)" :class="{ active: activeIndex == index }">
|
|
|
- <span class="svg-icon" :class="activeIndex == index ? 'svg-icon-yellow' : 'svg-icon-green'">
|
|
|
+ <router-link
|
|
|
+ v-for="(menuData, index) of menuDatas"
|
|
|
+ :key="index"
|
|
|
+ :to="menuData.path"
|
|
|
+ >
|
|
|
+ <div
|
|
|
+ class="page-common-body-menu-item"
|
|
|
+ @click="clickMenu(index)"
|
|
|
+ :class="{ active: activeIndex == index }"
|
|
|
+ >
|
|
|
+ <span
|
|
|
+ class="svg-icon"
|
|
|
+ :class="
|
|
|
+ activeIndex == index ? 'svg-icon-yellow' : 'svg-icon-green'
|
|
|
+ "
|
|
|
+ >
|
|
|
<SvgIcon :svgid="menuData.icon"></SvgIcon>
|
|
|
</span>
|
|
|
</div>
|
|
@@ -98,7 +111,7 @@ export default {
|
|
|
},
|
|
|
// 函数
|
|
|
methods: {
|
|
|
- clickMenu: function(index) {
|
|
|
+ clickMenu: function (index) {
|
|
|
this.activeIndex = index;
|
|
|
},
|
|
|
},
|
|
@@ -110,6 +123,21 @@ export default {
|
|
|
},
|
|
|
|
|
|
mounted() {},
|
|
|
+
|
|
|
+ watch: {
|
|
|
+ $route(res) {
|
|
|
+ this.menuDatas.forEach((ele) => {
|
|
|
+ let tempEle = ele.path.split("/");
|
|
|
+ if (
|
|
|
+ tempEle[tempEle.length - 1].indexOf("FDC") !== -1 ||
|
|
|
+ tempEle[tempEle.length - 1].indexOf("GDC") !== -1
|
|
|
+ ) {
|
|
|
+ tempEle[tempEle.length - 1] = res.params.wpId;
|
|
|
+ ele.path = tempEle.toString().replace(/,/g, "/");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
};
|
|
|
</script>
|
|
|
|