首页 > Vue警告:You are setting a non-existent path...

Vue警告:You are setting a non-existent path...

后台用的laravel,
代码是这样的:
https://jsfiddle.net/0od4hwmh/

单独拿出来写没什么错误,但是,在项目中的时候,控制台却显示:

[Vue warn]: You are setting a non-existent path "chosenFruite" on a vm instance. Consider pre-initializing the property with the "data" option for more reliable reactivity and better performance.

可能的问题是什么?


choswnFruite 未在 data 定义,你却想给它赋值


choswnFruite应该放在data或者props里,不然就会出现这个警告。

【热门文章】
【热门文章】