Update index.tsx

delete extra comment
pull/17026/head^2
Silow 1 year ago committed by GitHub
parent ed35fc3777
commit 18e0b0a45a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -204,7 +204,7 @@ const FileUploader = ({
return new Promise((resolve) => { return new Promise((resolve) => {
if (entry.isFile) { if (entry.isFile) {
entry.file((file: FileWithPath) => { entry.file((file: FileWithPath) => {
file.relativePath = `${prefix}${file.name}` // 保留相对路径 file.relativePath = `${prefix}${file.name}`
resolve([file]) resolve([file])
}) })
} }
@ -234,7 +234,7 @@ const FileUploader = ({
} }
}) })
}, },
[], // ← 依赖为空,引用稳定 [],
) )
const handleDrop = useCallback( const handleDrop = useCallback(

Loading…
Cancel
Save