zy-react-library/components/Upload/index.d.ts

29 lines
845 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import type { UploadProps as AntUploadProps, UploadFile } from "antd/es/upload";
import type { FC, ReactNode } from "react";
/**
* Upload 组件属性
*/
export interface UploadProps extends Omit<AntUploadProps, "fileList"> {
/** 文件列表 */
value?: UploadFile[];
/** 图片分辨率限制,如 "1920*1080" */
ratio?: `${number}*${number}`;
/** 是否显示提示,默认 true */
showTip?: boolean;
/** 文件大小限制单位MB默认 0不限制 */
size?: number;
/** 自定义提示内容 */
tipContent?: ReactNode;
/** listType 为 text 时上传按钮文本,默认 "点击选择文件上传" */
uploadButtonText?: string;
}
/**
* 文件上传组件
* 支持文件格式、大小、分辨率验证,支持图片预览
*/
declare const Upload: FC<UploadProps>;
export default Upload;