vue项目中遇到Cannot read properties of undefined (reading 'length')

在浏览器F12下,发现如下报错:

Vue warn]: Error in v-on handler (Promise/async): "TypeError: Cannot read properties of undefined (reading 'length')" TypeError: Cannot read properties of undefined (reading 'length')

这是代码

``` //改变状态 async deleteUser1() { for (let i = 0; i < this.casesId[i].length; i++) { console.log("11111", this.casesId[i].length); let parmars = { articleId: this.casesId[i], casesStat: 10, }; let res = await article.updateart(parmars); console.log("22222", res); } this.getCaseList(); },

```

``` {{ row.casesStat | statDate }}

```

```

屏蔽

```

这个报错的位置,实在是不知道怎么改啊

有没有老前辈,搭救一下

#

``` vue.esm.js?a026:628 [Vue warn]: Error in v-on handler (Promise/async): "TypeError: Cannot read properties of undefined (reading 'length')"

found in

---> at packages/button/src/button.vue at packages/main/src/main.vue at src/views/Index.vue at src/App.vue

```

vue.esm.js?a026:1906 TypeError: Cannot read properties of undefined (reading 'length') at _callee3$ (Caselist.vue?8692:238:1) at tryCatch (runtime.js?96cf:63:1) at Generator.invoke [as _invoke] (runtime.js?96cf:294:1) at Generator.eval [as next] (runtime.js?96cf:119:1) at asyncGeneratorStep (asyncToGenerator.js?1da1:3:1) at _next (asyncToGenerator.js?1da1:25:1) at eval (asyncToGenerator.js?1da1:32:1) at new Promise (<anonymous>) at eval (asyncToGenerator.js?1da1:21:1) at VueComponent.deleteUser1 (Caselist.vue?8692:238:1)

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值