From 543d169827a2418a4a83b604fac923d29781c6ef Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Sun, 22 Mar 2026 21:13:35 +0800
Subject: [PATCH] 添加持久化标签页开关功能
---
ruoyi-ui/src/layout/components/TagsView/index.vue | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index 08a2be5..2a6b9ba 100644
--- a/ruoyi-ui/src/layout/components/TagsView/index.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/index.vue
@@ -177,10 +177,13 @@
return tags
},
initTags() {
+ if (this.$store.state.settings.tagsViewPersist) {
+ this.$store.dispatch('tagsView/loadPersistedViews')
+ }
const affixTags = this.affixTags = this.filterAffixTags(this.routes)
for (const tag of affixTags) {
if (tag.name) {
- this.$store.dispatch('tagsView/addVisitedView', tag)
+ this.$store.dispatch('tagsView/addAffixView', tag)
}
}
},
--
Gitblit v1.9.3