Web Exception the data property is already declared Property or methond is not defined on the

﹏ヽ暗。殇╰゛Y 2023-02-26 09:30 98阅读 0赞

最近有个任务,迭代了一个星期,还没结束需求就变了,但是一个小的功能模块已经几百行代码了,所以想着应该抽取出来封装一下,那么抽取的遇到了一些小问题记录一下,是那种类似笔下误的错误

the data property is already declared as a prop Use Pro default value instead

封装组件 props 中的属性 和 data 中的属性重复了

Property or methond 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

当提示你所有方法都没有定义时 但你明明定义了,那么去看一看 methods 这个单词拼写是否正确

invalid prop type check failed for prop model ,Expected Object got Array found in xxxx

问题是在你的对应组件上 model 期望的值类型是Object 但是获取到的是Array 问题就去排查啊吧

发表评论

表情:
评论列表 (有 0 条评论,98人围观)

还没有评论,来说两句吧...

相关阅读