electron-vue 图片加载失败后使用默认头像

<img :src="item.headUrl" alt="" class="contact-head" :onerror="morenImage">

data () {
  return {
    morenImage: 'this.src="static/image/head.png"', // 默认头像
   }
 }

posted @ 2019-04-14 10:26  山村码农  阅读(1232)  评论(0编辑  收藏  举报