更新ts类型导入导出语法

This commit is contained in:
lyswhut
2022-11-25 23:01:39 +08:00
parent 5e9b3a16fa
commit 77ea6d3748
19 changed files with 527 additions and 513 deletions
+4 -2
View File
@@ -19,6 +19,8 @@ import router from './router'
import { getSetting, updateSetting } from './utils/ipc'
import { langList } from '@/lang'
import type { I18n } from '@/lang/i18n'
import { initSetting } from './store/setting'
// import { bubbleCursor } from './utils/cursor-effects/bubbleCursor'
@@ -40,8 +42,8 @@ void getSetting().then(setting => {
// window.lx.appSetting = setting
// Set language automatically
if (!setting['common.langId'] || !window.i18n.availableLocales.includes(setting['common.langId'])) {
let langId = null
let locale = window.navigator.language.toLocaleLowerCase()
let langId: I18n['locale'] | null = null
let locale = window.navigator.language.toLocaleLowerCase() as I18n['locale']
if (window.i18n.availableLocales.includes(locale)) {
langId = locale
} else {