This commit is contained in:
ailanyin
2023-05-09 15:21:05 +08:00
commit 6f3c27dee5
257 changed files with 19631 additions and 0 deletions

15
src/utils/dynamicTitle.js Normal file
View 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;
}
}