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

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