在vite脚手架项目当中,使用vue-i18n插件进行国际化多语言时,爆出

Uncaught TypeError: _ctx.$t is not a function

首先

查看vue-i18n的版本号:9.2.0-beta.32

修复这个问题添加 globalInjection: true 到i18n插件当中


const i18n = createI18n({legacy: false,locale: "ja",globalInjection: true,messages: {en: {message: {language: "English",greeting: "Hello !"}},ar: {message: {language: "العربية",greeting: "السلام عليكم"}},es: {message: {language: "Español",greeting: "Hola !"}}}
});
export default i18n;

vue-i18n插件报错:Uncaught TypeError: _ctx.$t is not a function相关推荐

  1. 立即执行函数报错Uncaught TypeError: (intermediate value) is not a function.

    立即执行函数报错Uncaught TypeError: (intermediate value) is not a function. 文章目录 立即执行函数报错Uncaught TypeError: ...

  2. Vue 3 + Vite + SuerMap iClient构建报错Uncaught TypeError utils.inherits is not a function

    一.现象 Uncaught TypeError: utils.inherits is not a function 二.问题产生原因 Elasticsearch本身就需要这些东西,以前没有问题是因为W ...

  3. JS 报错getElementsByClassName.appendChild报错“Uncaught TypeError: s.appendChild is not a function”

    getElementsByClassName这个方法返回的是:返回文档中所有指定类名的元素集合.因为集合是没有appendChild这个方法的,所以使用getElementsByClassName这个 ...

  4. 【解决】控制台报错Uncaught TypeError: Object(...) is not a function at eval (vue-router.esm-bundler.js

    打开http://localhost:8080/,控制台报错 Uncaught TypeError: Object(...) is not a functionat eval (vue-router. ...

  5. 小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined

    小程序组件报错Uncaught TypeError: Cannot read property 'name' of undefined Component({/*** 组件的属性列表*/propert ...

  6. js代码中for循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting ‘className‘)

    jsfor循环里绑定onclick事件报错Uncaught TypeError Cannot set properties of undefined (setting 'className') 我想要 ...

  7. layui报错Uncaught TypeError: tree is not a function

    layui报错Uncaught TypeError: tree is not a function tree({ elem: "#classtree" , data: data , ...

  8. JsonMap对象的获取与前台浏览器报错Uncaught TypeError: Cannot read property ‘map‘ of undefined

    JsonMap对象的获取与前台浏览器报错Uncaught TypeError: Cannot read property 'map' of undefined 经过不断排查以后发现是自己的后台传的值出 ...

  9. vue引入luckysheet插入图表时报错Uncaught TypeError: h.createChart is not a function

    Luckysheet(excel)引入chartMix的问题 记录问题:离线引入Luckysheet,插入图表时报错Uncaught TypeError: h.createChart is not a ...

  10. layui弹出层,报错:TypeError: layer.open is not a function

    在使用layui弹出层时,浏览器出现报错:TypeError: layer.open is not a function 报错错误如图: 修改: 添加 var layer = layui.layer; ...

最新文章

  1. python导入pods的时候出现错误:FileNotFoundError: [Errno 2] No such file or directory: ‘D:\\tmp\\sods.log‘
  2. selenium启动Firefox示例
  3. 深入理解乐观锁与悲观锁
  4. 如何在SAP的的凭证流浏览器(DRB)中显示客户自定义的凭证
  5. flutter - URL出现在网站名称的位置
  6. 微信小程序怎么新建php文件,微信小程序中创建小程序页面的步骤介绍(图文)...
  7. Python应用实战-Clumper | dplyr式的Python数据操作包
  8. mysql数据库version版本控制_MySQL数据库版本控制
  9. 10月15日发布!谷歌Pixel 4系列或将全系支持5G
  10. 在线支付巨头PayPal宣布退出Libra:继续就未来合作方式进行对话
  11. 你连Nginx怎么转发给你请求都说不清楚,还好意思说自己不是CRUD工程师?
  12. extern int a 和int a的区别
  13. 有截图功能的android播放器,Android视频播放器VPlayer发新版本 增加截图功能
  14. Excel去除重复项的几种方法
  15. c#中计算三角形面积公式_高中数学|向量公式之用平面向量求三角形面积
  16. luogu4188 [USACO18JAN]Lifeguards S
  17. P5149 会议座位(逆序对 离散化 hash 归并排序)
  18. 怎么在MAC系统下查看系统详细信息?新手快来看!
  19. vrchat新手教程_VRChat简易教程3-往世界里导入模型和VRC接口初探
  20. Android进程保活黑科技实现原理解密及方法,最新整理

热门文章

  1. Linux 硬盘分区、分区命名和分区格式化
  2. vmware虚拟机黑屏问题
  3. matlab 2011a 下载,MATLAB 2011a(7.12) for Windows and Unix下载链接(Download Link)
  4. 后端关于 Token 的验证
  5. 试玩 dpdk ebfp 功能
  6. 老子的软件之道 - 道篇 5 企业管理
  7. 有人可以用Javascript解释美元符号吗?
  8. CocosCreator动画弹窗
  9. 用finereport做一个大屏
  10. ​用互联网思维看待大数据