From 661e8cf7b40d79d2024969e56f04100b31abef1a Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Wed, 11 Feb 2026 15:38:13 +0800
Subject: [PATCH] 优化字典类型属性提醒说明
---
ruoyi-ui/src/layout/components/TagsView/index.vue | 27 +++++++++++++++++++--------
1 files changed, 19 insertions(+), 8 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index 2381d2e..fa837fc 100644
--- a/ruoyi-ui/src/layout/components/TagsView/index.vue
+++ b/ruoyi-ui/src/layout/components/TagsView/index.vue
@@ -5,7 +5,7 @@
v-for="tag in visitedViews"
ref="tag"
:key="tag.path"
- :class="isActive(tag)?'active':''"
+ :class="{ 'active': isActive(tag), 'has-icon': tagsIcon }"
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
tag="span"
class="tags-view-item"
@@ -13,6 +13,7 @@
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
@contextmenu.prevent.native="openMenu(tag,$event)"
>
+ <svg-icon v-if="tagsIcon && tag.meta && tag.meta.icon && tag.meta.icon !== '#'" :icon-class="tag.meta.icon" />
{{ tag.title }}
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
</router-link>
@@ -51,7 +52,10 @@
return this.$store.state.permission.routes
},
theme() {
- return this.$store.state.settings.theme;
+ return this.$store.state.settings.theme
+ },
+ tagsIcon() {
+ return this.$store.state.settings.tagsIcon
}
},
watch: {
@@ -76,18 +80,18 @@
return route.path === this.$route.path
},
activeStyle(tag) {
- if (!this.isActive(tag)) return {};
+ if (!this.isActive(tag)) return {}
return {
"background-color": this.theme,
"border-color": this.theme
- };
+ }
},
isAffix(tag) {
return tag.meta && tag.meta.affix
},
isFirstView() {
try {
- return this.selectedTag.fullPath === this.visitedViews[1].fullPath || this.selectedTag.fullPath === '/index'
+ return this.selectedTag.fullPath === '/index' || this.selectedTag.fullPath === this.visitedViews[1].fullPath
} catch (err) {
return false
}
@@ -134,7 +138,6 @@
if (name) {
this.$store.dispatch('tagsView/addView', this.$route)
}
- return false
},
moveToCurrentTag() {
const tags = this.$refs.tag
@@ -152,7 +155,10 @@
})
},
refreshSelectedTag(view) {
- this.$tab.refreshPage(view);
+ this.$tab.refreshPage(view)
+ if (this.$route.meta.link) {
+ this.$store.dispatch('tagsView/delIframeView', this.$route)
+ }
},
closeSelectedTag(view) {
this.$tab.closePage(view).then(({ visitedViews }) => {
@@ -176,7 +182,7 @@
})
},
closeOthersTags() {
- this.$router.push(this.selectedTag).catch(()=>{});
+ this.$router.push(this.selectedTag.fullPath).catch(()=>{})
this.$tab.closeOtherPage(this.selectedTag).then(() => {
this.moveToCurrentTag()
})
@@ -275,6 +281,11 @@
}
}
}
+
+ .tags-view-item.active.has-icon::before {
+ content: none !important;
+ }
+
.contextmenu {
margin: 0;
background: #fff;
--
Gitblit v1.9.3