template
<img :onerror="errorUserPhoto" :src="'Ecp.Picture.view.img?pictureId=' + head_pic" />
script
import userPhoto from '@/assets/images/userPhoto.jpg'
data() {
return {
errorUserPhoto:'this.src="' + userPhoto + '"',
}
}
---------------------
作者:Shuah153
来源:CSDN
原文:https://blog.csdn.net/weixin_36934930/article/details/80576630?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!