From bc2cda03481cd62a1b04959d2653678053e60b18 Mon Sep 17 00:00:00 2001 From: liukangdong <898885815@qq.com> Date: 星期五, 31 五月 2024 18:23:35 +0800 Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/dmvisit --- admin/src/components/common/tagsview.vue | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/admin/src/components/common/tagsview.vue b/admin/src/components/common/tagsview.vue index 8d654bc..6f66b69 100644 --- a/admin/src/components/common/tagsview.vue +++ b/admin/src/components/common/tagsview.vue @@ -12,7 +12,7 @@ :key="index" :id="'tags-box-' + index" @contextmenu.prevent="openMenu(item, $event)" - :class="isActive(item.url, index) ? 'active' : ''" + :class="isActive(item.url, item.params,index) ? 'active' : ''" class="tagsview" @click="tagsmenu(item, index)" > @@ -68,7 +68,7 @@ }, $route(to, from) { this.tags.forEach((item, index) => { - if (item.url === to.path) { + if (item.url === to.path && item.index === to.query.index) { const tagsDiv = document.getElementById('tags-box') if (index) { tagsDiv.scrollTo(index * 110, 0) @@ -129,11 +129,11 @@ } } else { // 閭d箞锛屽鏋滀笂闈㈢殑鏉′欢閮戒笉鎴愮珛锛屾病鏈塴ength=0.涔熷氨鏄浣犺繕鏈夊ソ鍑犱釜鏍囩锛屽苟涓斾綘鍒犻櫎鐨勬槸鏈�鍚庝竴浣嶆爣绛撅紝閭d箞灏卞線宸﹁竟鎸竴浣嶈烦杞矾鐢� - this.$router.push({ path: this.tags[index - 1].url }) + this.$router.push({ path: this.tags[index - 1].url,query:{param: this.tags[index - 1].params} }) } } else { // 濡傛灉浣犵偣鍑讳笉鏄渶鍚庝竴浣嶆爣绛撅紝鐐圭殑鍓嶉潰鐨勶紝閭e氨寰�鍙宠竟璺宠浆 - this.$router.push({ path: this.tags[index].url }) + this.$router.push({ path: this.tags[index].url ,query:{param: this.tags[index].params}}) } }, // 鐐瑰嚮璺宠浆璺敱 @@ -142,7 +142,7 @@ // 鍒ゆ柇锛氬綋鍓嶈矾鐢变笉绛変簬褰撳墠閫変腑椤圭殑url锛屼篃灏变唬琛ㄤ綘鐐瑰嚮鐨勪笉鏄幇鍦ㄩ�変腑鐨勬爣绛撅紝鏄彟涓�涓爣绛惧氨璺宠浆杩囧幓锛屽鏋滀綘鐐瑰嚮鐨勬槸鐜板湪宸茬粡閫変腑鐨勬爣绛惧氨涓嶇敤璺宠浆浜嗭紝鍥犱负浣犲凡缁忓湪杩欎釜璺敱浜嗚繕璺充粈涔堝憿銆� if (this.$route.path !== item.url) { // 鐢╬ath鐨勮烦杞柟娉曟妸褰撳墠椤圭殑url褰撲綔鍦板潃璺宠浆銆� - this.$router.push({ path: item.url }) + this.$router.push({ path: item.url ,query:{param: this.tags[index].params}}) const tagsDiv = document.getElementById('tags-box') if (index) { tagsDiv.scrollTo(index * 110, 0) @@ -150,8 +150,8 @@ } }, // 閫氳繃鍒ゆ柇璺敱涓�鑷磋繑鍥炲竷灏斿�兼坊鍔燾lass锛屾坊鍔犻珮浜晥鏋� - isActive(route, index) { - const res = route === this.$route.path + isActive(route,params, index) { + const res =(route === this.$route.path && params== this.$route.query.param) return res }, scrollToStart() { -- Gitblit v1.9.3