<van-uploader v-model="uploadList" :after-read="process"/>
uploadList为数组
取上传列表中图片的数据 base64数据
//取上传列表中图片的数据 base64数据
let imgbase64 = uploadList[0].content.replace(/^data:image\/\w+;base64,/, '');
//这个是传给后台要处理的base64数据
this.$nextTick(() => {
this.$set(this.uploadList.length - 1], 'content', 'data:image/jpeg;base64,' + 后台处理后
图片base64数据)
})
//多图上传请自行处理
现在列表就是处理过后的数据了,预览也是修改后的图片