JS 根据base64获取文件宽高
const {width, height} = await this.getImgSize(base64)
async getImgSize(base64) {
const image = new Image()
image.crossOrigin = ''
image.src = base64
return new Promise((resolve, reject) => {
image.onload = () => {
const {width, height} = image
resolve({width, height})
}
})
},
浙公网安备 33010602011771号