速翔网络
速翔网络
  • 发布:2022-12-05 14:05
  • 更新:2022-12-05 14:05
  • 阅读:208

js页面怎么引用uni-i18n

分类:uni-app

在vue文件可以使用$t()函数
common.js文件使用不了$t()函数
尝试下面代码引用
import { initVueI18n } from '@dcloudio/uni-i18n'
import messages from '@/locale/index.js'
const { t } = initVueI18n(messages)

common.js文件 无法使用 t()

大佬怎么引用啊?

2022-12-05 14:05 负责人:无 分享
已邀请:

要回复问题请先登录注册