import * as React from 'react'; import { ReactElement } from 'react'; import 'union-design/lib/upload/styles/css'; export interface UploadProps { /** * 类型 */ type?: 'Button' | 'Card' | 'Drag'; action?: string; data?: any; accept?: string; method?: 'POST' | 'PUT' | 'PATCH'; withCredentials?: boolean; disabled?: boolean; headers?: Record; beforeUpload?: any; directory?: boolean; multiple?: boolean; listType?: 'text' | 'picture' | 'picture-card'; name?: string; onPreview?: (file: UploadFile) => void; onChange?: (fileList: UploadFile[]) => void; canDrag?: boolean; renderList?: (files: UploadFile[]) => ReactElement; onRemove?: boolean; style?: object; } interface UploadFile { file?: File; uid?: string; status?: 'pre-treated' | 'uploading' | 'error' | 'success'; percent?: number; action?: string; data?: Record; name?: string; thumbUrl?: string; } declare const Upload: React.FC; export default Upload;