Buefy复选框无效

时间:2017-12-12 22:59:58

标签: laravel vue.js vuejs2 vue-component bulma

我正在尝试在登录页面中创建一个简单的buefy复选框,但它没有显示。 (它只显示“记住我”的文字)。我是从Laravel装置做到这一点的。我的vue版本是2.5.9,buefy是0.6.2,而bulma版本是0.6.1。这是我的登录页面

@extends('layouts.app')

@section('content')


<div class="columns">
 <div class="column is-one-third is-offset-one-third m-t-100">
    <div class="card">
        <div class="card-content">
            <h1 class="title">Log In</h1>

            <div class="field">
                <label for="email" class="label">Email Address</label>
                <p class="control">
                    <input class="input" type="text" name="email" placeholder="name@example.com">
                </p>
            </div>
            <div class="field">
                <label for="password" class="label">Password</label>
                <p class="control">
                    <input class="input" type="password" name="password" placeholder="Password">
                </p>
            </div>
            <b-checkbox name="remember" class="m-t-20">Remember Me</b-checkbox>
            <button class="button is-primary is-outlined is-fullwidth m-t-30">Log In</button>
        </div>       
    </div>
 </div>

</div>

@endsection

页脚

<!-- Scripts -->
<script src="{{ asset('/js/app.js') }}"></script>
</body>
</html>

app.js

require('./bootstrap');

window.Vue = require('vue');
import Buefy from 'buefy'
import 'buefy/lib/buefy.css'

Vue.use(Buefy);

//Vue.component('example-component', 
require('./components/ExampleComponent.vue'));
var app = new Vue({
el: '#app',
data: {}
})

的package.json

{
"private": true,
"scripts": {
    "dev": "npm run development",
    "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
    "watch-poll": "npm run watch -- --watch-poll",
    "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
    "prod": "npm run production",
    "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
},
"devDependencies": {
    "axios": "^0.17",
    "cross-env": "^5.1",
    "jquery": "^3.2",
    "laravel-mix": "^1.0",
    "lodash": "^4.17.4",
    "vue": "^2.5.9"
}
}

0 个答案:

没有答案