乐趣区

关于前端:elimg头像点击放大浏览

成果展现:

代码:


 <el-image
              style="width: 40px; height: 40px"
              :src="'/oa/img/' + currentUser.headIcon":preview-src-list="srcList">
            </el-image>
export default{data() {
        return{srcList:[]
        }
    }

      mounted(){this.$get("/user/currentUser", {}, resp => {this.srcList.push('/oa/img/'+this.currentUser.headIcon);
            })
      }
      '/oa/img/'+this.currentUser.headIcon(能够换成你取出来的图片 url)
}

退出移动版