src/layout/components/AppMain.vue
@@ -20,6 +20,7 @@ import IframeToggle from './IframeToggle/index.vue'; const { proxy } = getCurrentInstance() as ComponentInternalInstance; const route = useRoute(); const tagsViewStore = useTagsViewStore(); // 随机动画集合 @@ -37,6 +38,20 @@ }, { immediate: true } ); onMounted(() => { addIframe() }) watchEffect((route) => { addIframe() }) function addIframe() { if (route.meta.link) { useTagsViewStore().addIframeView(route) } } </script> <style lang="scss" scoped>