<img :src="item.headUrl" alt="" class="contact-head" :onerror="morenImage"> data () { return { morenImage: 'this.src="static/image/head.png"', // 默认头像 } }
electron-vue 图片加载失败后使用默认头像
原文:https://www.cnblogs.com/ybixian/p/10704134.html