import React from 'react'; import { UploadProps } from 'antd/lib/upload'; import { UploadFile } from './'; import { TableRowSelection } from '../Table'; export interface IUploadRef { validate?: (info?: any) => any; } export interface IProps extends UploadProps { /**是否显示上传表格 */ showTable?: boolean; /**是否显示提示tip */ showTip?: boolean; /**是否显示上传按钮 */ showUploadBtn?: boolean; /**是否显示删除按钮 */ showDeleteBtn?: boolean; /**是否显示批量删除按钮 */ showAllDeleteBtn?: boolean; /**批量删除回调 */ allDeleteCallback?: any; /**是否显示批量下载按钮 */ showAllDownloadBtn?: boolean; /** 批量下载文件名 */ batchDownloadZipName?: string; /**批量删除回调 */ allDownloadCallback?: any; /**是否显示下载按钮 */ onDownLoadCallbackBefore?: (file: any) => boolean; showDownloadBtn?: boolean; onDownLoadCallbackAfter?: (file: any) => void; /**是否显示预览按钮 */ showPreviewBtn?: boolean; onPreviewCallbackBefore?: (file: any) => boolean; /**允许上传的文件类型 */ ztAccept?: string[]; /**允许上传的文件类型名字 */ ztShowTipText?: string; /**允许上传的最大文件大小 */ maxSize?: number; /**允许上传的最大数量 */ maxCount?: number; /**最大文件大小提示 */ maxSizeStr?: string; /**上传文件人 */ uploadUser?: string; /**默认文件列表 */ originFileList?: UploadFile[]; /** * 文件设置回调 * 当fileList 中的所有文件的status属性为done时,才可以确认文件上传完毕 **/ callback?: (fileList: any) => void; /** * 文件删除 */ onDeleteCallback?: (index: number, file: any) => void; /**是否自动删除 */ isAutoDelete?: boolean; /**api服务器 base */ apiBaseUrl: string; /**file服务器 base */ fileBaseUrl?: string; /**token */ authToken?: string; /**fileBtnText */ fileBtnText?: string; /**是否是公用文件 */ isPublic?: boolean; /**额外的上传表格列配置 */ startColumns?: any; otherColumns?: any; /**是否直接替换 */ isDirect?: boolean; /**附件上传对象 */ upload?: any; /**是否显示selection */ rowSelection?: TableRowSelection | 'checkbox' | 'radio'; /**组件提供给外部调用的一些方法 */ uploadTableRef?: any; /**表格方法 */ tableRestProps?: any; customRender?: React.ReactNode; } export declare function getFileId(item: any): any; export declare function getFileSize(item: any): any; declare const Upload: React.FC; export default Upload;