[Vue warn]: Avoid adding reactive properties to a Vue instance or its root $data at runtime - declar
作者: 时间:2023-12-03阅读数:人阅读
报错详情图:
[Vue warn]: Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option.
大概意思就是说 避免在运行时向Vue实例或其根$data添加反应性属性-在数据选项中预先声明它。
他让我们在$data添加属性,我们就进行添加
可以先在按钮里面定义一个属性,名字随意,如图
然后在data里面将他return回去就行
报错消失,问题解决
希望能有所帮助
本站所有文章、数据、图片均来自互联网,一切版权均归源网站或源作者所有。
如果侵犯了你的权益请来信告知我们删除。邮箱:licqi@yunshuaiweb.com