mirror of
https://github.com/yangzongzhuan/RuoYi-Vue3.git
synced 2025-09-28 07:12:41 +00:00
ruoyi
This commit is contained in:
13
src/utils/dynamicTitle.js
Normal file
13
src/utils/dynamicTitle.js
Normal file
@@ -0,0 +1,13 @@
|
||||
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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user