浏览器后台报错,Vue组件的坑:property or method " " is not defined on the instance but referenced during render.Make sure that this property in reactive,either in the data,or for class-based


页面那个很正常,但是浏览器后天一直报错:property or method "组件名 " is not defined on the instance but referenced during render.Make sure that this property in reactive,either in the data,or for class-based 

以前也遇到过,这个是:有个方法或者属性在数据data里没定义,无法实现数据的响应式的样式,提供观察发现父组件里有个v-model“组件名”,确实在data里没定义属性,初始值给个

因为v-models=属性名“”,是Vue双向绑定,必须现在data里定义个初始值,在发福利改变值或状态:所以

data(){

v-model的绑定属性:false;// 可以了

}


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM