1.引入默认的图片地址
import defaultImg from '@/assets/logo.png'
2.在img标签里面加上onerror属性
<imgstyle="width: 32px; height: 32px; border: 1px solid #ccc; border-radius: 4px":src="picture":onerror="defal"/>
3.在data里面拼接上defal
data(){return{defal: 'this.src="' + defaultImg + '"',}}