Procházet zdrojové kódy

修复默认关闭Tags-Views时,内链页面打不开

RuoYi před 1 rokem
rodič
revize
28a16d9878

+ 16 - 0
ruoyi-ui/src/layout/components/AppMain.vue

@@ -22,6 +22,22 @@ export default {
22 22
     key() {
23 23
       return this.$route.path
24 24
     }
25
+  },
26
+  watch: {
27
+    $route() {
28
+      this.addIframe()
29
+    }
30
+  },
31
+  mounted() {
32
+    this.addIframe()
33
+  },
34
+  methods: {
35
+    addIframe() {
36
+      const {name} = this.$route
37
+      if (name && this.$route.meta.link) {
38
+        this.$store.dispatch('tagsView/addIframeView', this.$route)
39
+      }
40
+    }
25 41
   }
26 42
 }
27 43
 </script>

+ 0 - 4
ruoyi-ui/src/layout/components/TagsView/index.vue

@@ -133,11 +133,7 @@ export default {
133 133
       const { name } = this.$route
134 134
       if (name) {
135 135
         this.$store.dispatch('tagsView/addView', this.$route)
136
-        if (this.$route.meta.link) {
137
-          this.$store.dispatch('tagsView/addIframeView', this.$route)
138
-        }
139 136
       }
140
-      return false
141 137
     },
142 138
     moveToCurrentTag() {
143 139
       const tags = this.$refs.tag