添加持久化标签页开关功能

This commit is contained in:
RuoYi
2026-03-22 23:29:23 +08:00
parent ec0ca11cc6
commit 959a2ffd67

View File

@@ -139,9 +139,6 @@ export default {
key: 'tagsViewPersist', key: 'tagsViewPersist',
value: val value: val
}) })
if (!val) {
this.$cache.local.remove('tags-view-visited')
}
} }
}, },
tagsView: { tagsView: {
@@ -250,6 +247,9 @@ export default {
}, },
saveSetting() { saveSetting() {
this.$modal.loading("正在保存到本地,请稍候...") this.$modal.loading("正在保存到本地,请稍候...")
if (!this.tagsViewPersist) {
this.$cache.local.remove('tags-view-visited')
}
this.$cache.local.set( this.$cache.local.set(
"layout-setting", "layout-setting",
`{ `{
@@ -269,6 +269,7 @@ export default {
}, },
resetSetting() { resetSetting() {
this.$modal.loading("正在清除设置缓存并刷新,请稍候...") this.$modal.loading("正在清除设置缓存并刷新,请稍候...")
this.$cache.local.remove('tags-view-visited')
this.$cache.local.remove("layout-setting") this.$cache.local.remove("layout-setting")
setTimeout("window.location.reload()", 1000) setTimeout("window.location.reload()", 1000)
} }