From 00f7ab34efc17bf383eecf7bf81844b874ac1a8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?= <15040126243@163.com> Date: Tue, 3 Dec 2024 11:15:09 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=85=B3=E9=97=ADTags-Views=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=86=85=E9=93=BE=E9=A1=B5=E9=9D=A2=E6=89=93=E4=B8=8D?= =?UTF-8?q?=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/AppMain.vue | 15 +++++++++++++++ src/layout/components/TagsView/index.vue | 4 ---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 7f86ef4..9f8d706 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -20,6 +20,7 @@ import useTagsViewStore from '@/store/modules/tagsView'; import IframeToggle from './IframeToggle/index.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; +const route = useRoute(); const tagsViewStore = useTagsViewStore(); // 随机动画集合 @@ -37,6 +38,20 @@ watch( }, { immediate: true } ); + +onMounted(() => { + addIframe() +}) + +watch((route) => { + addIframe() +}) + +function addIframe() { + if (route.meta.link) { + useTagsViewStore().addIframeView(route) + } +}