Error in render: "TypeError: Cannot read property 'url_img' of undefined"

2023-05-25,,

  如果我们 vue 组件中 template 里面添加了下标(靠数组索引得到的值),就会报索引为 undefined

  解决方法:

    

  在我们使用下标时,要在父组件上做条件判断,如果这个下标存在,然后就显示里面的内容,这样就不会报 undefined 了,

Error in render: "TypeError: Cannot read property 'url_img' of undefined"的相关教程结束。

《Error in render: "TypeError: Cannot read property 'url_img' of undefined".doc》

下载本文的Word格式文档,以方便收藏与打印。