fix(plugin-fm): fix attachment component selectable check (#4563)

This commit is contained in:
Junyi 2024-06-05 14:50:38 +08:00 committed by GitHub
parent d7866a6b51
commit 3f8ab46dc1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -390,7 +390,8 @@ export function Uploader({ rules, ...props }: UploadProps) {
const { mimetype: accept, size } = rules ?? {};
const sizeHint = useSizeHint(size);
const selectable = !disabled && (multiple || !(value || pendingList.length));
const selectable =
!disabled && (multiple || ((!value || (Array.isArray(value) && !value.length)) && !pendingList.length));
return (
<>