繁体   English   中英

模板未在 Laravel 5.5 和 Vue.js 中显示

[英]Template not showing in Laravel 5.5 and Vue.js

我有一个问题,因为 Vue.js 的模板没有显示在blade.php 我从本教程https://www.itechempires.com/2017/10/laravel-5-5-vuejs-2-0-crud-operations-application/一步一步完成了所有工作,但它不起作用。

我的代码:

名册.vue

<template>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-heading">Roster</div>

                    <div class="panel-body">

                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
    export default {
        mounted() {

        }
    }
</script>

应用程序.js

/**
 * First we will load all of this project's JavaScript dependencies which
 * includes Vue and other libraries. It is a great starting point when
 * building robust, powerful web applications using Vue and Laravel.
 */

require('./bootstrap');

window.Vue = require('vue');

/**
 * Next, we will create a fresh Vue application instance and attach it to
 * the page. Then, you may begin adding components to this application
 * or customize the JavaScript scaffolding to fit your unique needs.
 */

Vue.component('example-component', require('./components/ExampleComponent.vue'));
Vue.component('roster', require('./components/Roster.vue'));

const app = new Vue({
    el: '#app'
});

名册刀片:

@extends('layouts.admin.dashboard')


@section('content')


<task></task>

@endsection

我跑了 gulp watch 还是什么都没有。

------------编辑:问题的解决方案丢失<div id="app"> </div>

问题的解决方案是缺少<div id="app"> </div>

<script src="{{ mix('js/app.js') }}"></script>

在刀片文件中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM