将图片文件转成BASE64格式

时间:2021-12-03 17:15:14
     html5Reader (file, item) {
const reader = new FileReader()
reader.onload = (e) => {
this.$set(item, 'src', e.target.result)
}
reader.readAsDataURL(file)
}
            const item = {
name: list[i].name,
size: list[i].size,
file: list[i]
}
this.html5Reader(list[i], item)

相关文章