Vue components Cannot read property '__ob__' of undefined
来源:互联网 发布:农村淘宝宝网址是什么 编辑:程序博客网 时间:2024/06/05 20:50
最近使用vue重构项目遇到一个问题,困扰了2天
点击搜索后页面显示搜索结果,此时调用组件列表
列表渲染之后,显示当前列表,再点击清除按钮还原搜索前状态,即图1
此时报错如下:Cannot read property ‘ob’ of undefined
因为列表组件由另一同事缩写,个人也粗心并没有多看,从头触发排除
试着用div方式去循环,发现并没有报错,锁定问题出现在Newslists组件中,
最终排查原因并不是数据出错,只是一个简单的data中没有写return!
一个简单的return 困扰了很长时间,也找过网上有人所说的主页调用子组件,需要把 list[] 传入组件中,在组件中循环,也试过此方式发现并没有用。
最后总结:开发过程需严谨,开发时间浪费在return上确实有点难受呀!!!
阅读全文
2 0
- Vue components Cannot read property '__ob__' of undefined
- Vue2.0 之 vue Cannot read property '__ob__' of undefined 异常(back报错)
- vue报错 vue Cannot read property ‘ob’ of undefined
- Vue-router cannot read property _c of undefined
- vue.js中报错: TypeError: Cannot read property 'indexOf' of undefined
- "TypeError: Cannot read property 'undefined' of undefined"
- Cannot read property 'autoCreated' of undefined
- TypeError: Cannot read property 'parentNode' of undefined
- Cannot read property 'nodeType' of undefined
- Cannot read property 'xxx' of undefined
- TypeError: Cannot read property 'left' of undefined
- Vue2-Cannot read property 'component' of undefined
- [Jquery]Cannot read property 'msie' of undefined
- Cannot read property ‘msie’ of undefined
- Cannot read property ‘msie’ of undefined
- Cannot read property 'rownumbers' of undefined
- TypeError: Cannot read property 'newLine' of undefined
- TypeError: Cannot read property 'password' of undefined
- 独立测试团队在敏捷开发中的几个特别实践
- Solr服务的搭建
- 对于等比例缩放代码设置说明!
- pandas数据处理
- java 构造函数 重载 递归调用
- Vue components Cannot read property '__ob__' of undefined
- Java高级之虚拟机加载机制
- 第一篇博客
- 充电五分钟即可充满手机 石墨烯电池会是未来吗?
- User Manual for Emotiv Xavier Control Panel中文版
- 听见丨厦门现共享单车坟墓 京东:将为在北京清退租户行动中受影响员工提供关怀
- 微信小程序开发。
- 总有个瞬间,让你下定决心踹掉这份工作!
- 极大极小搜索