From 28a16d9878b0b55ca3af27c9e8ee3409a549dac3 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 27 Nov 2024 19:49:12 +0800
Subject: [PATCH] 修复默认关闭Tags-Views时,内链页面打不开

---
 ruoyi-ui/src/layout/components/AppMain.vue        |   16 ++++++++++++++++
 ruoyi-ui/src/layout/components/TagsView/index.vue |    4 ----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/ruoyi-ui/src/layout/components/AppMain.vue b/ruoyi-ui/src/layout/components/AppMain.vue
index c206a18..d88c67c 100644
--- a/ruoyi-ui/src/layout/components/AppMain.vue
+++ b/ruoyi-ui/src/layout/components/AppMain.vue
@@ -22,6 +22,22 @@
     key() {
       return this.$route.path
     }
+  },
+  watch: {
+    $route() {
+      this.addIframe()
+    }
+  },
+  mounted() {
+    this.addIframe()
+  },
+  methods: {
+    addIframe() {
+      const {name} = this.$route
+      if (name && this.$route.meta.link) {
+        this.$store.dispatch('tagsView/addIframeView', this.$route)
+      }
+    }
   }
 }
 </script>
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index 1fc2323..44eff7d 100644
--- a/ruoyi-ui/src/layout/components/TagsView/index.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/index.vue
@@ -133,11 +133,7 @@
       const { name } = this.$route
       if (name) {
         this.$store.dispatch('tagsView/addView', this.$route)
-        if (this.$route.meta.link) {
-          this.$store.dispatch('tagsView/addIframeView', this.$route)
-        }
       }
-      return false
     },
     moveToCurrentTag() {
       const tags = this.$refs.tag

--
Gitblit v1.9.3