Vue2.0 之 vue Cannot read property '__ob__' of undefined 异常(back报错)
来源:互联网 发布:淘宝客没权重吗 编辑:程序博客网 时间:2024/05/21 18:46
Vue2.0 之 back键报错
(异常:vue Cannot read property ‘ob’ of undefined)
这个原因是因为我在本页面循环了组件的原因,例如:
虽然在这个页面子组件页面不报任何异常,但是我back返回上一个页面的时候,就会报vue Cannot read property '__ob__' of undefined
异常,一直以为是上一页面的子组件的问题造成,反复查找,后来经过跟踪才发现,是因为我在本页面循环了子组件的原因,频繁创建,一直没有销毁,所以才会造成返回上一个页面的时候才会报错,趁着时间赶快记录下这一问题!
PS: 坑太多,有时候真让你意想不到,所以先定位问题,然后在解决问题!
解决方案:
在本页面拿到数组集合,传值到子组件内容中,然后循环子组件,即可解决问题!
1 0
- Vue2.0 之 vue Cannot read property '__ob__' of undefined 异常(back报错)
- Vue components Cannot read property '__ob__' of undefined
- vue报错 vue Cannot read property ‘ob’ of undefined
- Vue2.0 axios报错: Cannot read property 'protocol' of undefined
- Vue2-Cannot read property 'component' of undefined
- 【vue2.0】Cannot read property 'matched' of undefined
- sencha touch报错 Cannot read property 'apply' of undefined
- 解决jquery报错cannot read property 'length' of undefined
- 解决dataTable 报错:cannot read property "style" of undefined
- Angularjs报错:TypeError: Cannot read property 'slice' of undefined
- react native 报错:cannot read property 'length' of undefined
- Vue.js搭建路由报错 router.map is not a function,Cannot read property ‘component’ of undefined
- Vue-router cannot read property _c of undefined
- vue.js中报错: TypeError: Cannot read property 'indexOf' of undefined
- easyui reload方法报Cannot read property 'options' of undefined
- Webpack+react-router 报 Cannot read property 'toUpperCase' of undefined
- easyui 异常:Uncaught TypeError: Cannot read property 'tabs' of undefined
- "TypeError: Cannot read property 'undefined' of undefined"
- 欢迎使用CSDN-markdown编辑器
- C++连接MongoDB的接口实现
- Spring 多视图配置
- 揭秘Angular 2(一):TypeScript入门
- js事件委托
- Vue2.0 之 vue Cannot read property '__ob__' of undefined 异常(back报错)
- Linux 问题解决方案
- 数组指针和指针数组的区别
- 各种变换滤波和噪声的类型和用途总结
- HttpServletRequest
- 【输入法相关论文】
- 归并排序
- LeetCode 121 Best Time to Buy and Sell Stock
- Python(13):格式化输出