ts event 类型

function fileSelected(e: Event) {
  const target = e.target as HTMLInputElement
  const file: File = (target.files as FileList)[0]
  // ...
}
posted @ 2021-05-20 18:03  guangzan  阅读(4726)  评论(3编辑  收藏  举报