import defaultSettings from '@/settings'
import useSettingsStore from '@/store/modules/settings'
import i18n from '@/i18n'

/**
 * 动态修改标题
 */
export function useDynamicTitle() {
  const settingsStore = useSettingsStore()
  const systemTitle = i18n.t('login.title')
  if (settingsStore.dynamicTitle) {
    document.title = settingsStore.title + ' - ' + systemTitle
  } else {
    document.title = systemTitle
  }
}