/** * 数据类型 */ export interface UploadItem extends Record { /** 唯一标识 */ key: string | number | symbol; /** 显示的图片地址, 为空时显示文件图标 */ url?: string; /** 文件名称 */ name?: string; /** 上传状态 */ status?: UploadStatus; /** 上传进度, 0 ~ 100 */ progress?: number; /** 选择的文件 */ file?: File; /** 是否只读 */ readonly?: boolean; } /** * 上传状态 */ export type UploadStatus = 'uploading' | 'done' | 'exception' | null; /** * 图片预览配置 */ export interface PreviewOption { /** 是否打开 */ visible: boolean; /** 当前图片链接 */ current?: string; /** 当前图片索引 */ currentIndex: number; /** 图片列表 */ images: string[]; } /** * 国际化 */ export interface UploadLocale { uploading: string; exception: string; retry: string; }