!11 fix(i18n): 修复 h5 使用 useI18n().t 报错的问题

Merge pull request !11 from wyl86/i18n
This commit is contained in:
菲鸽 2024-07-24 09:24:54 +00:00 committed by Gitee
commit 8a77bc66f2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -11,6 +11,7 @@ const messages = {
const i18n = createI18n({ const i18n = createI18n({
locale: uni.getLocale(), // 获取已设置的语言fallback 语言需要再 manifest.config.ts 中设置 locale: uni.getLocale(), // 获取已设置的语言fallback 语言需要再 manifest.config.ts 中设置
messages, messages,
allowComposition: true,
}) })
console.log(uni.getLocale()) console.log(uni.getLocale())