网站介绍:文章浏览阅读7.8k次。原因一:异步请求数据还没到,vue在拿到数据之前就已经渲染完了页面解决方案数据为数组:hotspotList[i]&&hotspotList[i].itemid例如 <div style="display: flex;justify-content: space-between"> <p class="item-title">{{hotspotList[i]&&hotspotList[i].hotspotTitl_cannot read properties of undefined (reading 'id')
- 链接地址:https://blog.csdn.net/qwqc262/article/details/119916513
- 链接标题:[Vue]“TypeError: Cannot read property ‘id‘ of undefined“的解决方法_cannot read properties of undefined (reading 'id')-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:7557
- 网站标签:cannot read properties of undefined (reading 'id')