fix(web): use Array.from() for FileList to fix tsc type errors (#31398)

This commit is contained in:
lif
2026-01-22 19:51:24 +08:00
committed by GitHub
parent b9f718005c
commit e2d7fe9c72
9 changed files with 10 additions and 10 deletions

View File

@ -36,7 +36,7 @@ export const useUploader = ({ onFileChange, containerRef, enabled = true }: Uplo
setDragging(false)
if (!e.dataTransfer)
return
const files = [...e.dataTransfer.files]
const files = Array.from(e.dataTransfer.files)
if (files.length > 0)
onFileChange(files[0])
}