项目正常启动
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// 通用 UTSJSONObject 转任意 type 的函数
|
||||
// UTS 2024
|
||||
|
||||
import i18n from '../i18n/index.uts';
|
||||
import i18n from '@/uni_modules/i18n/index.uts';
|
||||
|
||||
/**
|
||||
* 切换应用语言设置
|
||||
@@ -13,7 +13,9 @@ export function switchLocale(locale: string) {
|
||||
|
||||
// 设置 i18n 语言
|
||||
try {
|
||||
i18n.global.locale.value = locale;
|
||||
if (i18n != null && i18n.global != null) {
|
||||
i18n.global.locale.value = locale;
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('Failed to switch locale:', err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user