Laravel5.6 Vue 中使用 buefy,使用 b-checkbox 的时候,数据绑定出错?
我使用laravel5.6版本进行的开发 ,使用了buefy的框架。代码出错的部分,
<p class="control">
<input type='text' name="password" id="password" class="input" v-if="!auto_password">
<b-checkbox class="m-t-15 auto_generate" name="auto_generate" v-model="auto_password" >Auto Generate Password</b-checkbox>
</p>
Js代码:
var app=new Vue({
el:"#app",
data:{
auto_password:true,
}
});
当我在点击b-checkbox的时候,auto_password没有发生变化,我希望的是点击b-checkbox之后,input的标签会消失,而且我的控制台一直在报
[Vue warn]: Property or method "auto_password" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.的警告。
推荐文章: