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
bc70351e
Commit
bc70351e
authored
May 15, 2025
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
delete vue-meta
parent
fe0c1fcb
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
22 additions
and
13 deletions
+22
-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
+13
-0
No files found.
ruoyi-ui/package.json
View file @
bc70351e
...
...
@@ -44,7 +44,6 @@
"vue"
:
"2.6.12"
,
"vue-count-to"
:
"1.0.13"
,
"vue-cropper"
:
"0.5.5"
,
"vue-meta"
:
"2.4.0"
,
"vue-router"
:
"3.4.9"
,
"vuedraggable"
:
"2.24.3"
,
"vuex"
:
"3.6.0"
...
...
ruoyi-ui/src/App.vue
View file @
bc70351e
...
...
@@ -10,15 +10,7 @@ import ThemePicker from "@/components/ThemePicker"
export
default
{
name
:
"App"
,
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
}
}
}
components
:
{
ThemePicker
}
}
</
script
>
<
style
scoped
>
...
...
ruoyi-ui/src/layout/components/Settings/index.vue
View file @
bc70351e
...
...
@@ -144,6 +144,7 @@ export default {
key
:
'dynamicTitle'
,
value
:
val
})
this
.
$store
.
dispatch
(
'settings/setTitle'
,
this
.
$store
.
state
.
settings
.
title
)
}
},
},
...
...
ruoyi-ui/src/main.js
View file @
bc70351e
...
...
@@ -33,8 +33,6 @@ import ImageUpload from "@/components/ImageUpload"
import
ImagePreview
from
"@/components/ImagePreview"
// 字典标签组件
import
DictTag
from
'@/components/DictTag'
// 头部标签组件
import
VueMeta
from
'vue-meta'
// 字典数据组件
import
DictData
from
'@/components/DictData'
...
...
@@ -60,7 +58,6 @@ Vue.component('ImagePreview', ImagePreview)
Vue
.
use
(
directive
)
Vue
.
use
(
plugins
)
Vue
.
use
(
VueMeta
)
DictData
.
install
()
/**
...
...
ruoyi-ui/src/settings.js
View file @
bc70351e
module
.
exports
=
{
/**
* 网页标题
*/
title
:
process
.
env
.
VUE_APP_TITLE
,
/**
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
*/
...
...
ruoyi-ui/src/store/modules/settings.js
View file @
bc70351e
import
defaultSettings
from
'@/settings'
import
{
useDynamicTitle
}
from
'@/utils/dynamicTitle'
const
{
sideTheme
,
showSettings
,
topNav
,
tagsView
,
fixedHeader
,
sidebarLogo
,
dynamicTitle
}
=
defaultSettings
...
...
@@ -30,6 +31,7 @@ const actions = {
// 设置网页标题
setTitle
({
commit
},
title
)
{
state
.
title
=
title
useDynamicTitle
()
}
}
...
...
ruoyi-ui/src/utils/dynamicTitle.js
0 → 100644
View file @
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
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