import * as React from 'react'; import { UploadFile } from 'antd/es/upload/interface'; import { StandardProps } from '../@types/common'; export interface XuiUploadButtonProps extends StandardProps { /** 发到后台的文件参数名 */ name?: string; /** 上传所需额外参数或返回上传额外参数的方法 */ data?: any; /** 上传接口地址 */ apiUrl: string; /** 上传列表的内联样式 */ listType?: 'picture-card' | 'text'; /** 接口的文件类型 */ accept?: string[]; /** 文件类型不匹配的报错提示 */ acceptErrorTip?: string; /** 上传文件大小限制 b为单位 */ maxSize?: number; /** 回填到onChange的上传接口返回值 */ callbackDataKey: 'ossKey' | 'url'; /** 上传文件大小不匹配的报错提示 */ maxSizeErrorTip?: string; /** 非空提示 */ nullErrorTip?: string; /** 模板下载地址 */ templateUrl?: string; /** 接口调用后的其他判断, 返回一个错误信息 */ otherJudgment?: (data: any) => Error; onChange?: (value: string | Error) => void; } export interface XuiUploadButtonHandles { clear: () => void; } export interface InitialStateType { fileList: Array; } declare const XuiUploadButton: React.ComponentType; export default XuiUploadButton;