mw_666 3 роки тому
батько
коміт
f9dd238197
1 змінених файлів з 13 додано та 9 видалено
  1. 13 9
      src/views/WindSite/WindSite.vue

+ 13 - 9
src/views/WindSite/WindSite.vue

@@ -116,18 +116,22 @@
 			clickMenu: function(index) {
 				if (index == 7) { //风场
 					this.jumpUrl();
-					this.menu();
+					this.menu(index);
 				}
 				this.activeIndex = index;
 			},
-			menu() {
-				this.menuDatas.forEach((ele) => {
-					if (ele.icon == 'svg-wind-site') {
-						ele.path = this.windsitePath
-					} else {
-						ele.path = ele.path + "/" + this.$route.params.wpId;
-					}
-				});
+			menu(index) {
+				if(index){
+					this.menuDatas[index].path = this.windsitePath;
+				}else{
+					this.menuDatas.forEach((ele) => {
+						if (ele.icon == 'svg-wind-site') {
+							ele.path = this.windsitePath
+						} else {
+							ele.path = ele.path + "/" + this.$route.params.wpId;
+						}
+					});
+				}
 			}
 		},
 		created() {