问题:
使用i18n实现国际化功能,在切换语言状态时 ,js报错:
TypeError: Cannot read property ‘_t’ of null at VueComponent.Vue.$t (vue-i18n.esm.js?a925:178)。
解决方案:
把this.$t('')
更改为
this.$root.$t('')
问题:
使用i18n实现国际化功能,在切换语言状态时 ,js报错:
TypeError: Cannot read property ‘_t’ of null at VueComponent.Vue.$t (vue-i18n.esm.js?a925:178)。
解决方案:
把this.$t('')
更改为
this.$root.$t('')