export type AffixType = 'camera' | 'gallery' | 'file'; export interface AffixProps { /** * 附件列表 * @type { File[] } * @default undefined * @description 附件列表,包含附件、音频等,可根据file.type区分 */ value?: File[]; /** * 附件类型 * @type { AffixType[] | boolean } * @default true */ affix?: AffixType[] | boolean; /** * 是否展开 * @type { boolean } * @default false */ expanded?: boolean; /** * 附件容器 * @type { HTMLElement | string } * @default undefined * @description 附件容器,用于指定附件列表的渲染位置。可以是 DOM 元素、CSS 选择器字符串,或为空时渲染在父元素中 */ affixContainer?: HTMLElement | string; /** * 文件变化回调 * @description 文件变化回调,返回附件列表 * @param { File[] } files 附件列表 * @returns { void } */ onChange?: (file: File[]) => void; } /** * 文件选择器基础属性 */ export interface BaseFileSelectorProps { /** * 最大文件大小(字节) */ maxSize?: number; /** * 支持的文件类型,默认* */ accept?: string; /** * 文件选择回调 */ onChange?: (files: File[]) => void; }