feat: 初始化项目架构
This commit is contained in:
15
ruoyi-fastapi-frontend/src/utils/dynamicTitle.js
Normal file
15
ruoyi-fastapi-frontend/src/utils/dynamicTitle.js
Normal file
@@ -0,0 +1,15 @@
|
||||
import store from '@/store'
|
||||
import defaultSettings from '@/settings'
|
||||
import useSettingsStore from '@/store/modules/settings'
|
||||
|
||||
/**
|
||||
* 动态修改标题
|
||||
*/
|
||||
export function useDynamicTitle() {
|
||||
const settingsStore = useSettingsStore();
|
||||
if (settingsStore.dynamicTitle) {
|
||||
document.title = settingsStore.title + ' - ' + defaultSettings.title;
|
||||
} else {
|
||||
document.title = defaultSettings.title;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user