From cd0ee95b9cc17be973530271f6a578952778fdb4 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: Fri, 23 May 2025 14:57:49 +0800
Subject: [PATCH] 添加页签图标显示开关功能
---
ruoyi-ui/src/layout/components/TagsView/index.vue | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/ruoyi-ui/src/layout/components/TagsView/index.vue b/ruoyi-ui/src/layout/components/TagsView/index.vue
index 09fe1d4..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>
@@ -52,6 +53,9 @@
},
theme() {
return this.$store.state.settings.theme
+ },
+ tagsIcon() {
+ return this.$store.state.settings.tagsIcon
}
},
watch: {
@@ -277,6 +281,11 @@
}
}
}
+
+ .tags-view-item.active.has-icon::before {
+ content: none !important;
+ }
+
.contextmenu {
margin: 0;
background: #fff;
--
Gitblit v1.9.3