From 569103fc6b59f2f1be47f1ab54cfc965196fdc48 Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Mon, 26 Jun 2023 10:58:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3router=20query=20=E4=B8=8D?= =?UTF-8?q?=E5=88=B7=E6=96=B0=E9=A1=B5=E9=9D=A2=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/CaseCard.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/CaseCard.vue b/src/components/CaseCard.vue index 0dd25ae..21b974b 100644 --- a/src/components/CaseCard.vue +++ b/src/components/CaseCard.vue @@ -30,12 +30,21 @@ import A6 from '@/static/img/caseshow/specialequip.png' import A7 from '@/static/img/caseshow/healthcare.png' import A8 from '@/static/img/caseshow/smarthome.png' import A9 from '@/static/img/caseshow/electronics.png' -import router from '@/router' +import { useRoute, useRouter } from 'vue-router' +const router = useRouter() +const route = useRoute() +import { watch } from 'vue' const props = defineProps({ activeTab: { type: Number, }, }) +watch( + () => route.query.t, + () => { + router.go(0) + }, +) const toClassifyPage = id => { router.push({ path: '/case-show',