天天看點

vue報錯Cannot read property '_t' of undefined

是在項目中用了多語言配置,vue 跟 i18n之間的相容問題。解決方法如下

替換成

Vue.use(ViewUI, {
  i18n: function (path, options) {
    let value = i18n.t(path, options);
    if (value !== null && value !== undefined) return value;
    return '';
  }
});