我按照tutorial进行了操作,并且我在#34; Passport的默认Vue前端"。现在的问题是Vue组件没有出现在Laravel 5.4中。 资源/ js / app.js:
require('./bootstrap');
Vue.component(
'passport-clients',
require('./components/passport/Clients.vue')
);
Vue.component(
'passport-authorized-clients',
require('./components/passport/AuthorizedClients.vue')
);
Vue.component(
'passport-personal-access-tokens',
require('./components/passport/PersonalAccessTokens.vue')
);
window.Vue = require('vue');
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: '#app'
});
resources / views / home.blade.php:
@extends('layouts.app')
@section('content')
<div class="container">
<div class="row">
<div class="col-md-8 col-md-offset-2">
<div class="panel panel-default">
<div class="panel-heading">Dashboard</div>
<div class="panel-body">
You are logged inn!
<passport-clients></passport-clients>
<passport-authorized-clients></passport-authorized-clients>
<passport-personal-access-tokens></passport-personal-access-tokens>
<example></example>
</div>
</div>
</div>
</div>
</div>
@endsection
我跑&#34; npm run dev&#34;在cmd但我在视图中看不到组件。我看不到示例组件。
答案 0 :(得分:2)
我的问题非常糟糕 我应该在app.js文件末尾的文件中编写行的组件。在window.vue之后......