typescript FileReader异步API

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了typescript FileReader异步API相关的知识,希望对你有一定的参考价值。

    var myReader:FileReader = new FileReader();
  
    myReader.onloadend = (loadEvent:any) => {
      // do stuff
      image.src = loadEvent.target.result; // here id display the image before converting it to base64 and upload
    };

以上是关于typescript FileReader异步API的主要内容,如果未能解决你的问题,请参考以下文章

FileReader.ReadAsync是否真正异步?

Js FileReader图片加载

typescript ap3.ts

typescript ap2.ts

typescript ap1.ts

typescript ap.ts