From b39db56e4386681e70fcefc0a4a55e9443a9545c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lyb=E5=88=98=E5=90=8C=E5=AD=A6?= <1553592282@qq.com> Date: Mon, 8 Apr 2024 06:17:05 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=BB=98=E8=AE=A4=E5=85=B3?= =?UTF-8?q?=E9=97=ADTags-Views=E6=97=B6=EF=BC=8C=E5=86=85=E9=93=BE?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=89=93=E4=B8=8D=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Lyb刘同学 <1553592282@qq.com> --- ruoyi-ui/src/layout/components/AppMain.vue | 16 ++++++++++++++++ .../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 a25c562549..b857b79774 100644 --- a/ruoyi-ui/src/layout/components/AppMain.vue +++ b/ruoyi-ui/src/layout/components/AppMain.vue @@ -22,6 +22,22 @@ export default { key() { return this.$route.path } + }, + watch: { + $route() { + this.addTags() + } + }, + mounted() { + this.addTags() + }, + methods: { + addTags() { + const {name} = this.$route + if (name && this.$route.meta.link) { + this.$store.dispatch('tagsView/addIframeView', this.$route) + } + } } } diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue index 1fc2323522..44eff7d4ee 100644 --- a/ruoyi-ui/src/layout/components/TagsView/index.vue +++ b/ruoyi-ui/src/layout/components/TagsView/index.vue @@ -133,11 +133,7 @@ export default { 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 -- Gitee