From 497f98a2a835800b9dd74898c96a4a087a911159 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期三, 27 十一月 2024 19:50:47 +0800
Subject: [PATCH] 修复默认关闭Tags-Views时,内链页面打不开
---
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 8d3a136..cdd6a6f 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -15,7 +15,22 @@
import iframeToggle from "./IframeToggle/index"
import useTagsViewStore from '@/store/modules/tagsView'
+const route = useRoute()
const tagsViewStore = useTagsViewStore()
+
+onMounted(() => {
+ addIframe()
+})
+
+watch((route) => {
+ addIframe()
+})
+
+function addIframe() {
+ if (route.meta.link) {
+ useTagsViewStore().addIframeView(route)
+ }
+}
</script>
<style lang="scss" scoped>
diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue
index b2da82f..2cd6617 100644
--- a/src/layout/components/TagsView/index.vue
+++ b/src/layout/components/TagsView/index.vue
@@ -150,11 +150,7 @@
const { name } = route
if (name) {
useTagsViewStore().addView(route)
- if (route.meta.link) {
- useTagsViewStore().addIframeView(route);
- }
}
- return false
}
function moveToCurrentTag() {
--
Gitblit v1.9.3