input 给上@change事件,调用OpenUpload方法
OpenUpload(e) {
let files = e.target.files[0];
let url = "";
let reader = new FileReader();
reader.readAsDataURL(files)
let that = this;
reader.onload = function() {
url = this.result.substring(this.result.indexOf(",") + 1);
that.upload_imgurl = "data:image/png;base64," + url;
}
},