import { RadioProps } from '../../components/Radio/Radio.type'; import { SelectProps } from '../../components/Select/Select.type'; import { ZiSwitchProps } from '../../components/Switch/Switch.type'; type optionsItem = { label: string | number; value: string | number; disabled?: boolean; checked?: boolean; }; type checkboxsGroup = { disabled?: boolean; min?: number; max?: number; }; export interface MultiInputProps { /** * 组件类型 */ type?: 'checkbox' | 'switch' | 'select' | 'radio'; /** * 前置组件的选项,对于type=checkbox时有效 */ options?: optionsItem[]; /** * 排版 */ layout?: 'horizontal' | 'vertical'; /** * 尺寸 */ size?: 'small' | 'default' | 'large'; /** * 前置组件补充属性 */ preProps?: SelectProps | RadioProps | ZiSwitchProps | checkboxsGroup; /** * 前置组件宽度 */ preWidth?: string; /** * 后置组件宽度 */ suffixWidth?: string; /** * 前置组件值改变时,清空后置组件值,默认为true */ clearable?: boolean; } export type MultiInputSlots = { /** * 默认传递前置组件的值 */ default: (values?: any) => void; }; export {};