vue 报错解决:TypeError: Cannot read property '_t' of undefined"
            时间:2019-06-26 00:32:29  
            收藏:0  
            阅读:5091
        
        
        前端报错如下:
[Vue warn]: Error in render: “TypeError: Cannot read property ‘_t’ of undefined”
是在项目中用了多语言配置,vue 跟 i18n之间的兼容问题。解决方法如下:
Vue.use(iView) 替换成
Vue.use(iView, {
  i18n: function(path, options) {
    let value = i18n.t(path, options)
    if (value !== null && value !== undefined) {
      return value
    }
    return ''
  }
})国际化其他配置项不变
原文:https://www.cnblogs.com/smart-girl/p/11084010.html
            评论(0)
        
        
        