- ImageUploader(props): ReactNode
Parameters
props: {
accept?: string;
beforeUpload?: ((file, files) => null | File | Promise<null | File>);
capture?: boolean | "environment" | "user";
children?: ReactNode;
columns?: number;
defaultValue?: ImageUploadItem[];
deletable?: boolean;
deleteIcon?: ReactNode;
disableUpload?: boolean;
imageFit?: "fill" | "none" | "contain" | "cover" | "scale-down";
maxCount?: number;
multiple?: boolean;
onChange?: ((items) => void);
onCountExceed?: ((exceed) => void);
onDelete?: ((item) => boolean | void | Promise<boolean>);
onPreview?: ((index, item) => void);
onUploadQueueChange?: ((tasks) => void);
preview?: boolean;
renderItem?: ((originNode, file, fileList) => ReactNode);
showFailed?: boolean;
showUpload?: boolean;
upload: ((file) => Promise<ImageUploadItem>);
value?: ImageUploadItem[];
} & {
className?: string;
style?: CSSProperties & Partial<Record<"--gap" | "--gap-vertical" | "--gap-horizontal" | "--cell-size", string>>;
tabIndex?: number;
} & AriaAttributes & RefAttributes<ImageUploaderRef>
Returns ReactNode
Properties
Readonly $$typeof
$$typeof: symbol
Optional defaultProps
defaultProps?: Partial<{ accept?: string; beforeUpload?: ((file,
files) => null | File | Promise<null | File>); capture?: boolean | "environment" | "user"; children?: ReactNode; columns?: number; defaultValue?: ImageUploadItem[]; deletable?: boolean; deleteIcon?: ReactNode; disableUpload?: boolean; imageFit?: "fill" | "none" | "contain" | "cover" | "scale-down"; maxCount?: number; multiple?: boolean; onChange?: ((items) => void); onCountExceed?: ((exceed) => void); onDelete?: ((item) => boolean | void | Promise<boolean>); onPreview?: ((index,
item) => void); onUploadQueueChange?: ((tasks) => void); preview?: boolean; renderItem?: ((originNode,
file,
fileList) => ReactNode); showFailed?: boolean; showUpload?: boolean; upload: ((file) => Promise<ImageUploadItem>); value?: ImageUploadItem[]; } & { className?: string; style?: CSSProperties & Partial<Record<"--gap" | "--gap-vertical" | "--gap-horizontal" | "--cell-size", string>>; tabIndex?: number; } & AriaAttributes & RefAttributes<ImageUploaderRef>> Optional displayName
displayName?: string
Optional propTypes
propTypes?: WeakValidationMap<{ accept?: string; beforeUpload?: ((file,
files) => null | File | Promise<null | File>); capture?: boolean | "environment" | "user"; children?: ReactNode; columns?: number; defaultValue?: ImageUploadItem[]; deletable?: boolean; deleteIcon?: ReactNode; disableUpload?: boolean; imageFit?: "fill" | "none" | "contain" | "cover" | "scale-down"; maxCount?: number; multiple?: boolean; onChange?: ((items) => void); onCountExceed?: ((exceed) => void); onDelete?: ((item) => boolean | void | Promise<boolean>); onPreview?: ((index,
item) => void); onUploadQueueChange?: ((tasks) => void); preview?: boolean; renderItem?: ((originNode,
file,
fileList) => ReactNode); showFailed?: boolean; showUpload?: boolean; upload: ((file) => Promise<ImageUploadItem>); value?: ImageUploadItem[]; } & { className?: string; style?: CSSProperties & Partial<Record<"--gap" | "--gap-vertical" | "--gap-horizontal" | "--cell-size", string>>; tabIndex?: number; } & AriaAttributes & RefAttributes<ImageUploaderRef>>
Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.