From 7f4be6649bce1089711e13bddf22dbc5565eb189 Mon Sep 17 00:00:00 2001 From: andm31 Date: Thu, 23 May 2024 10:38:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:bug:=20=E4=BF=AE=E6=94=B9tagsview?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E4=B8=A2=E5=A4=B1query=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复url携带query时,顶部tagsview点击丢失问题 --- src/layout/components/TagsView/index.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 4255fa68..7d2096fe 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -162,6 +162,7 @@ function addTags() { fullPath: route.fullPath, affix: route.meta?.affix, keepAlive: route.meta?.keepAlive, + query: route.query, }); } } @@ -181,6 +182,7 @@ function moveToCurrentTag() { fullPath: route.fullPath, affix: route.meta?.affix, keepAlive: route.meta?.keepAlive, + query: route.query, }); } } @@ -222,7 +224,7 @@ function refreshSelectedTag(view: TagView) { tagsViewStore.delCachedView(view); const { fullPath } = view; nextTick(() => { - router.replace({ path: "/redirect" + fullPath }); + router.replace("/redirect" + fullPath); }); } @@ -235,7 +237,7 @@ function toLastView(visitedViews: TagView[], view?: TagView) { // you can adjust it according to your needs. if (view?.name === "Dashboard") { // to reload home page - router.replace({ path: "/redirect" + view.fullPath }); + router.replace("/redirect" + view.fullPath); } else { router.push("/"); }