Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/design-patterns/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel ypeError:无法读取属性'_t';未定义的_Laravel_Vue.js - Fatal编程技术网

Laravel ypeError:无法读取属性'_t';未定义的

Laravel ypeError:无法读取属性'_t';未定义的,laravel,vue.js,Laravel,Vue.js,我正在使用laravel+vue构建我的站点,我正在使用vue18n进行本地化。 我的app.js文件是: require('./bootstrap'); window.Vue = require('vue'); import Vue from 'vue'; import App from './components/App.vue'; import VueAxios from 'vue-axios'; import VueRouter from 'vue-router'; imp

我正在使用laravel+vue构建我的站点,我正在使用vue18n进行本地化。 我的app.js文件是:

 require('./bootstrap');
 window.Vue = require('vue');
 import Vue from 'vue';
 import App from './components/App.vue';
 import VueAxios from 'vue-axios';
 import VueRouter from 'vue-router';
 import axios from 'axios';
 import { routes } from './routes';
 import VueI18n from 'vue-i18n';

 import "bootstrap";
 import "bootstrap/dist/css/bootstrap.min.css";
 
 Vue.use(VueI18n);
 Vue.use(VueRouter);
 Vue.use(VueAxios, axios);

 const router = new VueRouter({
     mode: 'history',
     routes: routes
 });

 const app = new Vue({
     el: '#app',
     router: router,
     render: h => h(App),
 });
在我的newarticle.vue中:

<p>{{$t('message')}}</p>

你能帮我一下吗?

hm你可以检查那一行编译的
app.js
文件,看看你是否可以追溯到源代码如果你删除
{{$t('message')}

这一行错误消失了吗?@LajosArpad是的,但我需要它,我无法删除它it@Flame你能给我解释一下吗,内贾德,我不想让你永久移除它。这个问题旨在找出这条线是否确实是你问题的原因。您需要将线路拔下一分钟并进行测试。如果错误仍然出现,那么是其他原因造成的。如果错误不再出现,那么我们确认这是有问题的行。
TypeError: Cannot read property '_t' of undefined
at Proxy.Vue.$t (app.js:37834)
at Proxy.render (app.js:40051)
at VueComponent.Vue._render (app.js:47261)
at VueComponent.updateComponent (app.js:47779)
at Watcher.get (app.js:48192)
at new Watcher (app.js:48181)
at mountComponent (app.js:47786)
at VueComponent.Vue.$mount (app.js:52763)
at VueComponent.Vue.$mount (app.js:55672)
at init (app.js:46834)