瀏覽器后台報錯,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