From 5b9a1d6cb3a7d59c8f2de83c495bba1a069b2723 Mon Sep 17 00:00:00 2001 From: gaosp <gaosp> Date: 星期五, 19 一月 2024 00:23:15 +0800 Subject: [PATCH] update --- src/container/home/index.vue | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/container/home/index.vue b/src/container/home/index.vue index 5d4c8a9..eaf7554 100644 --- a/src/container/home/index.vue +++ b/src/container/home/index.vue @@ -199,19 +199,19 @@ }) }, goTo (item) { - if (!item.pathName) { + if (item.children && item.children.length > 0) { // 鏈夊瓙鑿滃崟 if (item.label === this.activeId) { this.showSub = !this.showSub } else { this.showSub = true } this.activeId = item.label || this.activeId - // if(item.pathName) { - // this.$router.push({name: item.pathName,params: item.params,query: item.query}) - // } - } else if(item.pathName){//浜岀骇鑿滃崟 + } else if (item.pathName && item.children && item.children.length === 0) { //鐖惰彍鍗� + this.activeId = item.label || this.activeId this.$router.push({name: item.pathName,params: item.params,query: item.query}) - } else if(item.href) { + } else if(item.pathName){ //浜岀骇鑿滃崟 + this.$router.push({name: item.pathName,params: item.params,query: item.query}) + } else if(item.href) {// 鎵撳紑鏂伴〉 window.open(item.href) } }, -- Gitblit v1.9.3