"@dcloudio/uni-i18n": "2.0.2-3081220230817001",
const messages = {
'zh-Hans': locale['zh-Hans'],
'zh-Hant': locale['zh-Hant'],
};
import { initVueI18n } from '@dcloudio/uni-i18n';
const { t, setLocale, getLocale } = initVueI18n(messages);
类型“{ 'zh-Hans': any; 'zh-Hant': any; }”的参数不能赋给类型“string”的参数。ts(2345)
const { t, setLocale, getLocale } = initVueI18n( 'zh-Hans',messages);这么写运行也报错,
有没有正确的写法
![夫子仰慕者](http://img-cdn-tc.dcloud.net.cn/uploads/avatar/001/65/88/57_avatar_mid.jpg?v=1706166574)
夫子仰慕者
- 发布:2023-10-10 15:14
- 更新:2023-10-10 15:14
- 阅读:106
0 个回复