1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- import { IBaseProps } from '../_util/base';
- export type Status = 'uploading' | 'done' | 'error';
- export interface File {
-
- uid?: string;
-
- url: string;
-
- status?: Status;
- }
- export interface LocalFile {
- path: string;
- size?: number;
- }
- export interface IUploaderProps extends IBaseProps {
-
- defaultFileList: File[];
-
- fileList: File[];
-
- maxCount: number;
-
- imageMode: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'heightFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
-
- sourceType: ['album'] | ['camera'] | ['camera', 'album'];
-
- onBeforeUpload?: (localFileList: LocalFile[]) => boolean | Promise<LocalFile[]>;
-
- onChooseImageError?: (err: any) => void;
-
- onChange?: (v: Array<File>) => void;
-
- onRemove?: (v: File) => boolean | Promise<boolean>;
-
- onPreview?: (v: Array<File>) => void;
-
- onUpload?: (localFile: LocalFile) => Promise<string>;
- }
- export declare const UploaderDefaultProps: Partial<IUploaderProps>;
- export declare const UploaderFunctionalProps: Partial<IUploaderProps>;
|