<img :src="item.icon" :οnerrοr="defaultImg" :alt="item.title" style="width:80px;height:80px" @click="next($event,item)" />
在图片标签添加:οnerrοr="defaultImg"
在export default {
data() {
return {
defaultImg: `this.src="${require('../../../assets/images/411177608550547457.jpg')}"`
};
}
}
添加defaultImg: `this.src="${require('../../../assets/images/411177608550547457.jpg')}"`