报错:ERROR TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'.
这是用ionic写的
\\xx.html
<input type="file" (change)="selectImage(this.files)" accept="image/jpeg,image/png,image/jpg">
\\xx.ts
selectImage(file){
var reader = new FileReader();
reader.onload = function(file){
// console.log(evt.currentTarget)
}
reader.readAsDataURL(file);
console.log(reader.readAsDataURL(file));
}
米脂
MM们
繁星淼淼
相关分类