Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
9ceca3a6
Commit
9ceca3a6
authored
May 23, 2025
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加页签图标显示开关功能
parent
cf257961
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
12 deletions
+36
-12
index.vue
ruoyi-ui/src/layout/components/Settings/index.vue
+17
-0
index.vue
ruoyi-ui/src/layout/components/TagsView/index.vue
+10
-1
settings.js
ruoyi-ui/src/settings.js
+7
-10
settings.js
ruoyi-ui/src/store/modules/settings.js
+2
-1
No files found.
ruoyi-ui/src/layout/components/Settings/index.vue
View file @
9ceca3a6
...
...
@@ -49,6 +49,11 @@
<el-switch
v-model=
"tagsView"
class=
"drawer-switch"
/>
</div>
<div
class=
"drawer-item"
>
<span>
显示页签图标
</span>
<el-switch
v-model=
"tagsIcon"
:disabled=
"!tagsView"
class=
"drawer-switch"
/>
</div>
<div
class=
"drawer-item"
>
<span>
固定 Header
</span>
<el-switch
v-model=
"fixedHeader"
class=
"drawer-switch"
/>
...
...
@@ -124,6 +129,17 @@ export default {
})
}
},
tagsIcon
:
{
get
()
{
return
this
.
$store
.
state
.
settings
.
tagsIcon
},
set
(
val
)
{
this
.
$store
.
dispatch
(
'settings/changeSetting'
,
{
key
:
'tagsIcon'
,
value
:
val
})
}
},
sidebarLogo
:
{
get
()
{
return
this
.
$store
.
state
.
settings
.
sidebarLogo
...
...
@@ -176,6 +192,7 @@ export default {
`{
"topNav":
${
this
.
topNav
}
,
"tagsView":
${
this
.
tagsView
}
,
"tagsIcon":
${
this
.
tagsIcon
}
,
"fixedHeader":
${
this
.
fixedHeader
}
,
"sidebarLogo":
${
this
.
sidebarLogo
}
,
"dynamicTitle":
${
this
.
dynamicTitle
}
,
...
...
ruoyi-ui/src/layout/components/TagsView/index.vue
View file @
9ceca3a6
...
...
@@ -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 @@ export default {
},
theme
()
{
return
this
.
$store
.
state
.
settings
.
theme
},
tagsIcon
()
{
return
this
.
$store
.
state
.
settings
.
tagsIcon
}
},
watch
:
{
...
...
@@ -277,6 +281,11 @@ export default {
}
}
}
.
tags-view-item
.
active
.
has-icon
:
:
before
{
content
:
none
!
important
;
}
.contextmenu
{
margin
:
0
;
background
:
#fff
;
...
...
ruoyi-ui/src/settings.js
View file @
9ceca3a6
...
...
@@ -10,7 +10,7 @@ module.exports = {
sideTheme
:
'theme-dark'
,
/**
*
是否
系统布局配置
* 系统布局配置
*/
showSettings
:
true
,
...
...
@@ -24,6 +24,11 @@ module.exports = {
*/
tagsView
:
true
,
/**
* 显示页签图标
*/
tagsIcon
:
false
,
/**
* 是否固定头部
*/
...
...
@@ -37,13 +42,5 @@ module.exports = {
/**
* 是否显示动态标题
*/
dynamicTitle
:
false
,
/**
* @type {string | array} 'production' | ['production', 'development']
* @description Need show err logs component.
* The default is only used in the production env
* If you want to also use it in dev, you can pass ['production', 'development']
*/
errorLog
:
'production'
dynamicTitle
:
false
}
ruoyi-ui/src/store/modules/settings.js
View file @
9ceca3a6
import
defaultSettings
from
'@/settings'
import
{
useDynamicTitle
}
from
'@/utils/dynamicTitle'
const
{
sideTheme
,
showSettings
,
topNav
,
tagsView
,
fixedHeader
,
sidebarLogo
,
dynamicTitle
}
=
defaultSettings
const
{
sideTheme
,
showSettings
,
topNav
,
tagsView
,
tagsIcon
,
fixedHeader
,
sidebarLogo
,
dynamicTitle
}
=
defaultSettings
const
storageSetting
=
JSON
.
parse
(
localStorage
.
getItem
(
'layout-setting'
))
||
''
const
state
=
{
...
...
@@ -11,6 +11,7 @@ const state = {
showSettings
:
showSettings
,
topNav
:
storageSetting
.
topNav
===
undefined
?
topNav
:
storageSetting
.
topNav
,
tagsView
:
storageSetting
.
tagsView
===
undefined
?
tagsView
:
storageSetting
.
tagsView
,
tagsIcon
:
storageSetting
.
tagsIcon
===
undefined
?
tagsIcon
:
storageSetting
.
tagsIcon
,
fixedHeader
:
storageSetting
.
fixedHeader
===
undefined
?
fixedHeader
:
storageSetting
.
fixedHeader
,
sidebarLogo
:
storageSetting
.
sidebarLogo
===
undefined
?
sidebarLogo
:
storageSetting
.
sidebarLogo
,
dynamicTitle
:
storageSetting
.
dynamicTitle
===
undefined
?
dynamicTitle
:
storageSetting
.
dynamicTitle
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment