// 上传图片 handleBeforeUploadCompanyLogo(file) { // 企业logo befoe var that = this const _URL = window.URL || window.webkitURL const isSize = new Promise((res,rej) => { const image = new Image() image.onload = function() { this.width >560 ||this.height>560?rej():res() } image.src = _URL.createObjectURL(file) }).then(()=>{ return file },()=>{ that.$Notice.error({ title: '请选择小于560*560大小的图片', }) return Promise.reject() }) return isSize },
标签:return,560,分辨率,像素,URL,file,const,上传,image From: https://www.cnblogs.com/everseventh/p/17511193.html