import React from 'react'; import { FormBaseProps } from '../form-input'; import { FormProps, FormComponentProps } from 'antd/lib/form'; import { UploadListType, UploadFile, UploadProps, UploadChangeParam } from 'antd/lib/upload/interface'; import { WrappedFormUtils } from 'antd/lib/form/Form'; interface IFormUpLoadProps extends FormBaseProps, FormProps, Omit { form: FormComponentProps['form']; normalizeValue?: (value: any, option: any, fieldValue: any) => any; fileType: string; customUploadClassName?: string; uploadBtn?: any; listType: UploadListType; controlNum?: number; action: string; getImageUrl: Function; handlePreview?: (file: any) => void; showProgress?: boolean; customUploadList?: (fieldValue: any) => any; handleChangeCallBack?: (fileList: any, form: WrappedFormUtils) => any; textForDisplay?: string; textForAnchor?: string; } interface IFormUpLoadState { previewVisible: boolean; previewImage: string; fileList: Array; progressPercent?: number; } declare class FormUpload extends React.Component { constructor(props: IFormUpLoadProps); handleCancel: () => void; handlePreview: (file: any) => Promise; handleChange: (info: UploadChangeParam>, type: string, cb?: Function | undefined, option?: object | undefined) => void; handleFileChange: (fileList: any, controlNum?: number | undefined) => any; getTypedList: (fileList: any[]) => any[] | undefined; renderUploadComponentByFiletype: (type: string, fileList: any, controlNum?: number | undefined, customUploadClassName?: any, uploadBtn?: any) => JSX.Element | null | undefined; onRemove: () => void; render(): JSX.Element; } export default FormUpload;