Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cocktail-party-server
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
cocktail-party
cocktail-party-server
Commits
bc70351e
提交
bc70351e
authored
5月 15, 2025
作者:
RuoYi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete vue-meta
上级
fe0c1fcb
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
23 行增加
和
13 行删除
+23
-13
package.json
ruoyi-ui/package.json
+0
-1
App.vue
ruoyi-ui/src/App.vue
+1
-9
index.vue
ruoyi-ui/src/layout/components/Settings/index.vue
+1
-0
main.js
ruoyi-ui/src/main.js
+0
-3
settings.js
ruoyi-ui/src/settings.js
+5
-0
settings.js
ruoyi-ui/src/store/modules/settings.js
+2
-0
dynamicTitle.js
ruoyi-ui/src/utils/dynamicTitle.js
+14
-0
没有找到文件。
ruoyi-ui/package.json
浏览文件 @
bc70351e
...
@@ -44,7 +44,6 @@
...
@@ -44,7 +44,6 @@
"vue"
:
"2.6.12"
,
"vue"
:
"2.6.12"
,
"vue-count-to"
:
"1.0.13"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.5.5"
,
"vue-cropper"
:
"0.5.5"
,
"vue-meta"
:
"2.4.0"
,
"vue-router"
:
"3.4.9"
,
"vue-router"
:
"3.4.9"
,
"vuedraggable"
:
"2.24.3"
,
"vuedraggable"
:
"2.24.3"
,
"vuex"
:
"3.6.0"
"vuex"
:
"3.6.0"
...
...
ruoyi-ui/src/App.vue
浏览文件 @
bc70351e
...
@@ -10,15 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
...
@@ -10,15 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
export
default
{
export
default
{
name
:
"App"
,
name
:
"App"
,
components
:
{
ThemePicker
},
components
:
{
ThemePicker
}
metaInfo
()
{
return
{
title
:
this
.
$store
.
state
.
settings
.
dynamicTitle
&&
this
.
$store
.
state
.
settings
.
title
,
titleTemplate
:
title
=>
{
return
title
?
`
${
title
}
-
${
process
.
env
.
VUE_APP_TITLE
}
`
:
process
.
env
.
VUE_APP_TITLE
}
}
}
}
}
</
script
>
</
script
>
<
style
scoped
>
<
style
scoped
>
...
...
ruoyi-ui/src/layout/components/Settings/index.vue
浏览文件 @
bc70351e
...
@@ -144,6 +144,7 @@ export default {
...
@@ -144,6 +144,7 @@ export default {
key
:
'dynamicTitle'
,
key
:
'dynamicTitle'
,
value
:
val
value
:
val
})
})
this
.
$store
.
dispatch
(
'settings/setTitle'
,
this
.
$store
.
state
.
settings
.
title
)
}
}
},
},
},
},
...
...
ruoyi-ui/src/main.js
浏览文件 @
bc70351e
...
@@ -33,8 +33,6 @@ import ImageUpload from "@/components/ImageUpload"
...
@@ -33,8 +33,6 @@ import ImageUpload from "@/components/ImageUpload"
import
ImagePreview
from
"@/components/ImagePreview"
import
ImagePreview
from
"@/components/ImagePreview"
// 字典标签组件
// 字典标签组件
import
DictTag
from
'@/components/DictTag'
import
DictTag
from
'@/components/DictTag'
// 头部标签组件
import
VueMeta
from
'vue-meta'
// 字典数据组件
// 字典数据组件
import
DictData
from
'@/components/DictData'
import
DictData
from
'@/components/DictData'
...
@@ -60,7 +58,6 @@ Vue.component('ImagePreview', ImagePreview)
...
@@ -60,7 +58,6 @@ Vue.component('ImagePreview', ImagePreview)
Vue
.
use
(
directive
)
Vue
.
use
(
directive
)
Vue
.
use
(
plugins
)
Vue
.
use
(
plugins
)
Vue
.
use
(
VueMeta
)
DictData
.
install
()
DictData
.
install
()
/**
/**
...
...
ruoyi-ui/src/settings.js
浏览文件 @
bc70351e
module
.
exports
=
{
module
.
exports
=
{
/**
* 网页标题
*/
title
:
process
.
env
.
VUE_APP_TITLE
,
/**
/**
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
*/
*/
...
...
ruoyi-ui/src/store/modules/settings.js
浏览文件 @
bc70351e
import
defaultSettings
from
'@/settings'
import
defaultSettings
from
'@/settings'
import
{
useDynamicTitle
}
from
'@/utils/dynamicTitle'
const
{
sideTheme
,
showSettings
,
topNav
,
tagsView
,
fixedHeader
,
sidebarLogo
,
dynamicTitle
}
=
defaultSettings
const
{
sideTheme
,
showSettings
,
topNav
,
tagsView
,
fixedHeader
,
sidebarLogo
,
dynamicTitle
}
=
defaultSettings
...
@@ -30,6 +31,7 @@ const actions = {
...
@@ -30,6 +31,7 @@ const actions = {
// 设置网页标题
// 设置网页标题
setTitle
({
commit
},
title
)
{
setTitle
({
commit
},
title
)
{
state
.
title
=
title
state
.
title
=
title
useDynamicTitle
()
}
}
}
}
...
...
ruoyi-ui/src/utils/dynamicTitle.js
0 → 100644
浏览文件 @
bc70351e
import
store
from
'@/store'
import
defaultSettings
from
'@/settings'
/**
* 动态修改标题
*/
export
function
useDynamicTitle
()
{
if
(
store
.
state
.
settings
.
dynamicTitle
)
{
document
.
title
=
store
.
state
.
settings
.
title
+
' - '
+
defaultSettings
.
title
}
else
{
document
.
title
=
defaultSettings
.
title
}
}
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论