From c96820d72c06acab513c20d02d9fac49f14df366 Mon Sep 17 00:00:00 2001 From: cc500 <2014434568@qq.com> Date: Tue, 11 Feb 2025 15:43:38 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E5=AF=B9=E8=AF=9D?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/dialogue/dialogueView.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/views/dialogue/dialogueView.vue b/src/views/dialogue/dialogueView.vue index 2e7a4f8..558e50e 100644 --- a/src/views/dialogue/dialogueView.vue +++ b/src/views/dialogue/dialogueView.vue @@ -21,6 +21,8 @@ import WitchainDIcon from '@/assets/images/witchainD.png'; import WitchainDIconSelected from '@/assets/svgs/WitchainDSelected.svg'; import { useRouter } from 'vue-router'; import { reactive } from 'vue'; +const { createNewSession } = useHistorySessionStore(); + // 挂载全局事件 window.onHtmlEventDispatch = onHtmlEventDispatch as any; const { logout } = useAccountStore(); @@ -177,6 +179,13 @@ onMounted(() => { } }); +const addNewSession = async(routerName: string) => { + console.log(router.currentRoute.value.name, routerName) + if(router.currentRoute.value.name === routerName){ + await createNewSession(); + } +} + watch( ruleForm, () => { @@ -238,7 +247,7 @@ watch(