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

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

  解决方法:

    

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

原文地址:https://www.cnblogs.com/shangjun6/p/11416048.html