7.4.2 Cannot read property '_t' of undefined
See original GitHub issue[Vue warn]: Error in render: "TypeError: Cannot read property '_t' of undefined"
found in
---> <ISelect>
<Test> at resources/assets/js/views/test.vue
<Root>
TypeError: Cannot read property '_t' of undefined
at VueComponent.<anonymous> (app.js:83551)
at VueComponent.i18nHandler (app.js:53665)
at VueComponent.t (app.js:53670)
at VueComponent.t (app.js:49081)
at VueComponent.boundFn [as t] (app.js:654)
at VueComponent.localePlaceholder (app.js:51461)
at Watcher.get (app.js:3577)
at Watcher.evaluate (app.js:3684)
at Proxy.computedGetter (app.js:3936)
at Proxy.render (app.js:71068)
I’ve had the same problem. I have not used the ‘_t’ property .I found that someone also met the same problem. Here are some of my configurations main.js
import iView from 'iview'
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
Vue.locale = () => {};
const messages = {
zh: Object.assign(require('./lang/zh-cn'), zh),
en: Object.assign(require('./lang/en-us'), en),
};
const i18n = new VueI18n({
locale: 'zh', // set locale
messages // set locale messages
});
const app = new Vue(Vue.util.extend({ router, store, i18n }, App)).$mount('#app');
test.vue
<template>
<div>
<Select v-model="global">
<Option :value="item.id" :key="item.id" v-for="item in country">{{ item.name }}</Option>
</Select>
</div>
</template>
<script>
export default {
data () {
return {
global:'',
country:this.$t('country'),
}
},
methods: {
},
mounted() {
},
}
</script>
When I use iView’s DatePicker and Select tags, it will happen
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:16
Top Results From Across the Web
Vue-i18n 'Cannot read property '_t' of undefined at Proxy.Vue.$t'
I'm using vue-cli-3 webpack config and installed vue-i18n from npm and using as a plugin. i18n.js (in src/plugins directory): import Vue from ...
Read more >cannot read properties of undefined (reading 'install') at vue.use
Vuetify Uncaught TypeError : Cannot read property 'install' of undefined ... "In order to use treeshaking, you must import Vuetify from vuetify/lib.
Read more >When editing a user picker custom field, a 'Cannot read ...
Exception: Uncaught TypeError: Cannot read property 'scrollTop' of undefined. Steps to reproduce. Create a customfield with User Picker (multiple users) ...
Read more >Vue I18N Typeerror: Cannot Read Property 'T' Of Undefined
The error tells you that the Reference you are trying to use is null.References don't always have values.It's like a finger pointing to...
Read more >Cannot read property 't' of undefined (Create Plugins) - Get Help
Cannot read property 't' of undefined (Create Plugins) ... For a long time trying to understand what the problem is. I could not....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The same here, this package documentation is terrible, examples just don’t work.
The document has been omitted.
add this code ,it will be ok
The complete example should be: