From f542d731de01e6897243b2072523ecdaa6c63505 Mon Sep 17 00:00:00 2001 From: 马宇豪 <978517621@qq.com> Date: 星期五, 01 三月 2024 08:50:02 +0800 Subject: [PATCH] 修改 --- src/layout/components/TagsView/index.vue | 14 +++++++++++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/layout/components/TagsView/index.vue b/src/layout/components/TagsView/index.vue index 96585a5..708ed6e 100644 --- a/src/layout/components/TagsView/index.vue +++ b/src/layout/components/TagsView/index.vue @@ -31,6 +31,7 @@ <script> import ScrollPane from './ScrollPane' import path from 'path' +import {mapState} from "vuex"; export default { components: { ScrollPane }, @@ -52,7 +53,10 @@ }, theme() { return this.$store.state.settings.theme; - } + }, + ...mapState({ + indexPage: state => state.permission.indexPage + }) }, watch: { $route() { @@ -83,7 +87,11 @@ }; }, isAffix(tag) { - return tag.meta && tag.meta.affix + if (tag.fullPath == this.indexPage) { + return true + } else { + return tag.meta && tag.meta.affix + } }, isFirstView() { try { @@ -206,7 +214,7 @@ // to reload home page this.$router.replace({ path: '/redirect' + view.fullPath }) } else { - this.$router.push('/') + this.$router.push(this.indexPage) } } }, -- Gitblit v1.9.2