First, make sure to hang Vue under window.vm in main.js (the name of VM can be customized)
window.vm = new Vue({
el: '#app',
i18n,
router,
store,
render: h => h(App)
})
Secondly, when writing multi language in the pop-up box, you need to add VM.
for example, when writing multi language, you need to write {$t ('xxxxx ')}
or this. $t ('xxx')
then you need to write {VM. $t ('xxxxx ')}
or this. VM. $t ('xxxxx')
or this
Read More:
- Cannot read property ‘i18n‘ of undefined
- Vue error resolution: TypeError: Cannot read property’_t’ of undefined”
- Vue error in render: “typeerror: cannot read property ‘name’ of undefined”
- Vue error resolution: typeerror: cannot read property ‘_ t’ of undefined”
- [Vue warn]: Error in render: “TypeError: Cannot read properties of undefined
- Cannot read property ‘this compilation’ of undefined appears in copy webpack plugin
- In Vue, use echorts to report an error: “typeerror: cannot read property ‘init’ of undefined” error reporting reason and solution
- Error in created hook: “typeerror: cannot read property ‘cm’ of undefined”
- Error in mounted hook: “TypeError: Cannot read property ‘init‘ of undefined“
- TypeError: Cannot read property thisCompilation of undefined
- TypeError: Cannot read property ‘username‘ of undefined
- [Solved] Syntax Error: TypeError: Cannot read property ‘parseComponent‘ of undefined
- [Solved] Vue Error: TypeError: Cannot read property ‘end‘ of undefined
- Datatable plug-in error: uncaught typeerror: cannot read property ‘style’ of undefined
- Cannot read property ‘catch‘ of undefined“
- Cannot read property ‘substring’ of undefined in Vue
- [Vue warn]: Error in nextTick: “TypeError: Cannot read property ‘map‘ of null“
- Uncaught type error: cannot read property ‘MSIE’ of undefined
- Applet component properties error cannot read property ‘name’ of undefined
- pytorch raise RuntimeError(‘Error(s) in loading state_dict for {}:\n\t{}‘.format