vue 多层对象

image.png
从后台获取的incidents.push报uncaught typeerror: this.football_conduct_list[i].statistics.incidents[h].push is not a function
结构是这样的
image.png

阅读 1.7k
2 个回答
新手上路,请多包涵

看起来push前面的那一串不像是个数组。

从图片来看,你的this.football_conduct_list[i].statistics.incidents[h]
明显是个对象而非数组
整句话改成这样也许就行了。。不清楚你的具体需求

this.football_conduct_list[i].statistics.incidents[h].position = data.incident[i].position
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题