fix(file-upload): 修复上传组件accept为空报错问题 (#3529)

This commit is contained in:
chenxi-20 2025-06-24 15:13:21 +08:00 committed by GitHub
parent aad34cecdb
commit a602aa5653
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -272,6 +272,8 @@ export const beforeUpload =
if (accept) { if (accept) {
const isExist = isAcceptType(acceptArray, f, constants, type) const isExist = isAcceptType(acceptArray, f, constants, type)
isExist ? fileRow.push(f) : remove({ api, file: f, autoRemove }) isExist ? fileRow.push(f) : remove({ api, file: f, autoRemove })
} else {
fileRow.push(f)
} }
return type return type
}) })