import { PropType } from 'vue'; import { BaseSize, MaybePromise } from '../shared'; import { UploadUserFile } from 'element-plus'; import { AttachmentFile, AttachmentUploader, AttachmentThumbnail } from './types'; export declare const attachmentProps: { /** * 列表显示的文件 */ modelValue: { type: PropType; default: () => never[]; }; /** * 选中值,开启 selectable 有效 */ selectValue: { type: PropType; }; /** * 文件上传方法 */ uploader: { type: PropType; }; /** * 支持多文件上传, 同时在selectable时控制多选 */ multiple: { type: BooleanConstructor; }; /** * 允许上传文件的最大数量 */ limit: { type: NumberConstructor; }; /** * 接受上传的文件类型, 如:image/png, image/jpeg * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers */ accept: { type: StringConstructor; default: string; }; /** * 禁止更改文件,不能上传和删除 */ disabled: { type: BooleanConstructor; }; /** * 图片显示尺寸 */ size: { type: PropType; default: string; }; /** * 缩略图生成方法 */ thumbnail: { type: PropType; }; /** * 可增加 */ addable: { type: BooleanConstructor; default: boolean; }; /** * 可删除 */ removable: { type: BooleanConstructor; default: boolean; }; /** * 可下载 */ downloadable: { type: BooleanConstructor; default: boolean; }; /** * 可预览 */ previewable: { type: BooleanConstructor; default: boolean; }; /** * 可选择 */ selectable: { type: BooleanConstructor; default: boolean; }; /** * 可点击 */ clickable: { type: BooleanConstructor; default: boolean; }; listType: { type: PropType<"card" | "list">; default: string; }; /** * 上传前守卫 */ beforeUpload: { type: FunctionConstructor; }; /** * 允许上传的文件大写最大值, 支持 K / M */ limitSize: { type: StringConstructor; default: string; }; formatter: { type: PropType<(files: AttachmentFile[]) => MaybePromise>; }; valueFormatter: { type: PropType<(files: UploadUserFile[]) => MaybePromise>; }; previewer: { type: PropType<(file: AttachmentFile) => void>; }; downloader: { type: PropType<(file: AttachmentFile) => void>; }; autoUpload: { type: BooleanConstructor; default: boolean; }; showTitle: { type: BooleanConstructor; default: boolean; }; };