ntzy_camera_system_web/src/utils/dynamicTitle.js

14 lines
388 B
JavaScript
Raw Normal View History

2021-11-30 09:55:37 +08:00
import defaultSettings from '@/settings'
import useSettingsStore from '@/store/modules/settings'
2021-11-30 09:55:37 +08:00
/**
* 动态修改标题
*/
export function useDynamicTitle() {
2025-04-27 09:58:29 +08:00
const settingsStore = useSettingsStore()
if (settingsStore.dynamicTitle) {
2025-04-27 09:58:29 +08:00
document.title = settingsStore.title + ' - ' + defaultSettings.title
2021-11-30 09:55:37 +08:00
} else {
2025-04-27 09:58:29 +08:00
document.title = defaultSettings.title
2021-11-30 09:55:37 +08:00
}
}