我正在使用Laravel 5.4和VueJs 2,在开发过程中我发现了这个错误,试图在互联网上看到几个解决方案,其中一些在stackoverflow中,但是这个错误占了上风。
app.js
require('./bootstrap');
window.Vue = require('vue');
import Vue from 'vue'
import VueMaterial from 'vue-material'
import 'vue-material/dist/vue-material.css'
Vue.use(VueMaterial)
import VueRouter from 'vue-router'
Vue.use(VueRouter)
let wall = require('./components/wall.vue');
let cabecalho = require('./components/cabecalho.vue');
let left = require('./components/menu.vue');
let right = require('./components/right.vue');
let duvida = require('./components/form-duvida.vue');
let content = require('./components/content.vue');
const app = new Vue({
el: '#app',
router,
components:{cabecalho, wall, left, right, duvida}
}).$mount('#app')
app.blade.php
<div class="main-content" id="app">
@yield('content')
</div>
<!-- Scripts -->
<script src="{{ asset('js/app.js') }}"></script>
main.blade.php
@extends('layouts.app')
@section('content')
<left></left>
@endsection