本文为博主原创,未经允许不得转载:

异常展示:

[Vue warn]: Error in getter for watcher "filterAndSortData": "TypeError: Cannot read property 'length' of null"

found in

---> <UxTable>
<UxCol>
<UxRow>
<CustomerDomainCofigDetail> at src/web/manage/customerManage/CustomerDomainCofigDetail.vue
<ElMain>
<ElContainer>
<MainAdmin> at src/web/manage/MainAdmin.vue
<App> at src/app.vue
<Root>
warn @ vue.esm.js?efeb:591
logError @ vue.esm.js?efeb:1737
globalHandleError @ vue.esm.js?efeb:1732
handleError @ vue.esm.js?efeb:1721
get @ vue.esm.js?efeb:3145
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
Promise.then (async)
microTimerFunc @ vue.esm.js?efeb:1806
nextTick @ vue.esm.js?efeb:1850
queueWatcher @ vue.esm.js?efeb:3068
update @ vue.esm.js?efeb:3209
notify @ vue.esm.js?efeb:697
reactiveSetter @ vue.esm.js?efeb:1014
proxySetter @ vue.esm.js?efeb:3300
(anonymous) @ CustomerDomainCofigDetail.vue?6300:488
Promise.then (async)
initData @ CustomerDomainCofigDetail.vue?6300:482
created @ CustomerDomainCofigDetail.vue?6300:627
callHook @ vue.esm.js?efeb:2921
Vue._init @ vue.esm.js?efeb:4630
VueComponent @ vue.esm.js?efeb:4798
createComponentInstanceForVnode @ vue.esm.js?efeb:4310
init @ vue.esm.js?efeb:4131
createComponent @ vue.esm.js?efeb:5608
createElm @ vue.esm.js?efeb:5555
updateChildren @ vue.esm.js?efeb:5845
patchVnode @ vue.esm.js?efeb:5936
patch @ vue.esm.js?efeb:6096
Vue._update @ vue.esm.js?efeb:2670
updateComponent @ vue.esm.js?efeb:2788
get @ vue.esm.js?efeb:3142
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
vue.esm.js?efeb:1741 TypeError: Cannot read property 'length' of null
at recursiveRows (utils.js?8c28:43)
at normalizeRows (utils.js?8c28:61)
at VueComponent.normalizeData (table.js?7ae6:141)
at Watcher.get (vue.esm.js?efeb:3142)
at Watcher.evaluate (vue.esm.js?efeb:3249)
at VueComponent.computedGetter [as normalizeData] (vue.esm.js?efeb:3507)
at VueComponent.filterAndSortData (table.js?7ae6:180)
at Watcher.get (vue.esm.js?efeb:3142)
at Watcher.evaluate (vue.esm.js?efeb:3249)
at VueComponent.computedGetter [as filterAndSortData] (vue.esm.js?efeb:3507)
logError @ vue.esm.js?efeb:1741
globalHandleError @ vue.esm.js?efeb:1732
handleError @ vue.esm.js?efeb:1721
get @ vue.esm.js?efeb:3145
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
Promise.then (async)
microTimerFunc @ vue.esm.js?efeb:1806
nextTick @ vue.esm.js?efeb:1850
queueWatcher @ vue.esm.js?efeb:3068
update @ vue.esm.js?efeb:3209
notify @ vue.esm.js?efeb:697
reactiveSetter @ vue.esm.js?efeb:1014
proxySetter @ vue.esm.js?efeb:3300
(anonymous) @ CustomerDomainCofigDetail.vue?6300:488
Promise.then (async)
initData @ CustomerDomainCofigDetail.vue?6300:482
created @ CustomerDomainCofigDetail.vue?6300:627
callHook @ vue.esm.js?efeb:2921
Vue._init @ vue.esm.js?efeb:4630
VueComponent @ vue.esm.js?efeb:4798
createComponentInstanceForVnode @ vue.esm.js?efeb:4310
init @ vue.esm.js?efeb:4131
createComponent @ vue.esm.js?efeb:5608
createElm @ vue.esm.js?efeb:5555
updateChildren @ vue.esm.js?efeb:5845
patchVnode @ vue.esm.js?efeb:5936
patch @ vue.esm.js?efeb:6096
Vue._update @ vue.esm.js?efeb:2670
updateComponent @ vue.esm.js?efeb:2788
get @ vue.esm.js?efeb:3142
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
vue.esm.js?efeb:591 [Vue warn]: Error in render: "TypeError: Cannot read property 'length' of null" found in ---> <UxTable>
<UxCol>
<UxRow>
<CustomerDomainCofigDetail> at src/web/manage/customerManage/CustomerDomainCofigDetail.vue
<ElMain>
<ElContainer>
<MainAdmin> at src/web/manage/MainAdmin.vue
<App> at src/app.vue
<Root>
warn @ vue.esm.js?efeb:591
logError @ vue.esm.js?efeb:1737
globalHandleError @ vue.esm.js?efeb:1732
handleError @ vue.esm.js?efeb:1721
Vue._render @ vue.esm.js?efeb:4546
updateComponent @ vue.esm.js?efeb:2788
get @ vue.esm.js?efeb:3142
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
Promise.then (async)
microTimerFunc @ vue.esm.js?efeb:1806
nextTick @ vue.esm.js?efeb:1850
queueWatcher @ vue.esm.js?efeb:3068
update @ vue.esm.js?efeb:3209
notify @ vue.esm.js?efeb:697
reactiveSetter @ vue.esm.js?efeb:1014
proxySetter @ vue.esm.js?efeb:3300
(anonymous) @ CustomerDomainCofigDetail.vue?6300:488
Promise.then (async)
initData @ CustomerDomainCofigDetail.vue?6300:482
created @ CustomerDomainCofigDetail.vue?6300:627
callHook @ vue.esm.js?efeb:2921
Vue._init @ vue.esm.js?efeb:4630
VueComponent @ vue.esm.js?efeb:4798
createComponentInstanceForVnode @ vue.esm.js?efeb:4310
init @ vue.esm.js?efeb:4131
createComponent @ vue.esm.js?efeb:5608
createElm @ vue.esm.js?efeb:5555
updateChildren @ vue.esm.js?efeb:5845
patchVnode @ vue.esm.js?efeb:5936
patch @ vue.esm.js?efeb:6096
Vue._update @ vue.esm.js?efeb:2670
updateComponent @ vue.esm.js?efeb:2788
get @ vue.esm.js?efeb:3142
run @ vue.esm.js?efeb:3219
flushSchedulerQueue @ vue.esm.js?efeb:2981
(anonymous) @ vue.esm.js?efeb:1837
flushCallbacks @ vue.esm.js?efeb:1758
vue.esm.js?efeb:1741 TypeError: Cannot read property 'length' of null
at recursiveRows (utils.js?8c28:43)
at normalizeRows (utils.js?8c28:61)
at VueComponent.normalizeData (table.js?7ae6:141)
at Watcher.get (vue.esm.js?efeb:3142)
at Watcher.evaluate (vue.esm.js?efeb:3249)
at VueComponent.computedGetter [as normalizeData] (vue.esm.js?efeb:3507)
at VueComponent.spinClasses (table.js?7ae6:313)
at Watcher.get (vue.esm.js?efeb:3142)
at Watcher.evaluate (vue.esm.js?efeb:3249)
at Proxy.computedGetter (vue.esm.js?efeb:3507)

该异常原因:由于在页面加载数据初始化的时候,定义了一个数组的数据类型,从后台获取数据初始化给该变量赋值,由于后台返回数据为null,将其赋值给数组的时候就报错了,

解决方法:在赋值的时候加一层为空的判断和校验即可解决

TypeError: Cannot read property 'length' of null的更多相关文章

  1. Uncaught TypeError: Cannot read property 'length' of null错误怎么处理?

    Uncaught TypeError: Cannot read property 'length' of null 错误怎么处理? 1.可能是返回的datagrid数据格式有问题,比如{"t ...

  2. Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null

    在开发Ext 项目中如果遇到 Uncaught TypeError: Cannot read property 'insertAdjacentHTML' of null 这个错误,检查下renderT ...

  3. Uncaught TypeError: Cannot set property 'innerHTML' of null

    学习Chrome插件时,要在弹出页面中显示当前时间,结果怎样也显示不出来 看了 http://www.cnblogs.com/mfryf/p/3701801.html 这篇文章后感悟颇深 通过调试发现 ...

  4. Three.js three.js Uncaught TypeError: Cannot read property 'getExtension' of null

    在调试Three.js执行加载幕布的时候,突然爆出这个错误three.js Uncaught TypeError: Cannot read property 'getExtension' of nul ...

  5. JavaScript Uncaught TypeError: Cannot read property 'value' of null

    用 JavaScript 操作 DOM 时出现如下错误: Uncaught TypeError: Cannot set property 'value' of null Uncaught TypeEr ...

  6. vue-cli +echarts-amap集成echarts和高德地图TypeError: Cannot read property 'dataToPoint' of null解决方案

    由于项目的需求,需要做一种迁徙效果, 最后我们采用了组件化开发,可以说这个坑自己一个人踩,有点累,但也收获不少. vue-cli +echarts-amap集成echarts和高德地图,出现报错,错误 ...

  7. vue v-if:"TypeError: Cannot read property 'length' of undefined"

    在使用v-if判断一个数组大小为0时,会出现 length 是undefined的错误:[Vue warn]: Error in render: "TypeError: Cannot rea ...

  8. 前台报错:Uncaught TypeError: Cannot read property '0' of null

    错误现象: var div1=mycss[0].style.backgroundColor;  //这一行提示360和chrome提示:Uncaught TypeError: Cannot read  ...

  9. Egret(白鹭引擎)——“TypeError: Cannot read property 'asCom' of null”

    前言 相信我,这个错误新手都不陌生:TypeError: Cannot read property 'asCom' of null 还有,一定要看我上一篇,哦不(人家应该是报了这个错,才找到看到这篇文 ...

随机推荐

  1. python 中字符串的格式化

    # 字符串格式化name = input("name:")age = int(input("age:"))job = input("job:" ...

  2. String字面量

    public class assa{ static String ee = "aa";//ee指向常量池中的aa static String ff = new String(&qu ...

  3. the pitfull way to create a uClinux image including gdb.

    After downloaded and installed the GCT's SDK and toolchain, we try to make an our own image which in ...

  4. 黏包:传输过程中 read(不可靠)传输时由于网络造成黏包

    但是你在读取本地文件  不涉及传输文件时   read还是可靠的

  5. 移动前端开发和 Web 前端开发的区别

    http://www.itcast.cn/news/20180125/16033584753.shtml 1,普通PC端开发与移动端开发区别. 先说背景,我大言不惭的说一下,我pc端的前端开发干了有快 ...

  6. IIC - 【转载】对I2C总线的时钟同步和总线仲裁的深入理解

    对I2C总线的时钟同步和总线仲裁的深入理解 每一个IIC总线器件内部的SDA.SCL引脚电路结构都是一样的,引脚的输出驱动与输入缓冲连在一起.其中输出为漏极开路的场效应管.输入缓冲为一只高输入阻抗的同 ...

  7. UIScrollView上面的UIButton点击始终在中间

    -(void)btnClick:(IdleTopChoseBtn *)btn{ btn.selected = YES; _choseBtn.selected = NO; _choseBtn = btn ...

  8. python框架之Django(5)-O/RM

    字段&参数 字段与db类型的对应关系 字段 DB Type AutoField integer AUTO_INCREMENT BigAutoField bigint AUTO_INCREMEN ...

  9. OpenMVG学习笔记

    OpenMVG 是一个不错的SFM开源算法库,可以实现基于多视图像的稀疏重建. OpenMVG SfM pipelines run as a 4 step process:包含四个基本过程 1. Im ...

  10. Oracle——trunc()函数的使用

    trunc是oracle数据库中一种格式化函数. 1.处理日期 1.1.当年第一天: SELECT TRUNC(SYSDATE,'YYYY') FROM DUAL; SELECT TRUNC(SYSD ...