Như bạn có thể thấy từ tiêu đề tôi đang thử Laravel 5.3 và hộ chiếu.Thành phần Vue không hiển thị khi sử dụng hộ chiếu trong laravel 5.3
Vì vậy, tôi đã trải qua các bước để cài đặt hộ chiếu Laravel và theo như tôi có thể thấy mọi thứ đã sẵn sàng.
Tôi đã đưa các thành phần tương ứng Vue vào đánh dấu của home.blade.php của tôi như sau để kiểm tra theo các tài liệu mà tôi đã làm như vậy
@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 in!
</div>
</div>
</div>
</div>
</div>
<passport-clients></passport-clients>
<passport-authorized-clients></passport-authorized-clients>
<passport-personal-access-tokens></passport-personal-access-tokens>
@endsection
Vue được phát hiện như chạy trong dev của tôi tuy nhiên các công cụ không có thành phần Vue nào đang hiển thị.
Đây là app.js tôi
Vue.component('example', require('./components/Example.vue'));
const app = new Vue({
el: 'body'
});
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')
);
Tôi nhận được lỗi
vue.common.js?4a36:1019 [Vue warn]: Unknown custom element: <passport-clients> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
Bất kỳ ý tưởng làm thế nào tôi có thể sửa lỗi này? Tôi khá mới để Vue
Bạn đã nhập khẩu các thành phần trong app.js bạn nộp? – tam5
Có, tôi đã nhập nó thực sự –
Vâng chính xác rằng –