import { CheckSelectOptionItem } from '../../components/Checkbox/Checkbox.type'; import { OptionItem, SelectProps } from '../../components/Select/Select.type'; export interface SimpleInputProps { /** * select的宽度 */ width?: number; /** * 前置外插槽组件类型,优先级要比prepend低,当before和prepend同时为true时, * 只会显示prepend,如果想要显示before,需要手动把prepend置为false */ before?: 'select' | 'radio'; /** * 是否需要前置内部插槽的select */ prepend?: boolean; /** * 是否需要后置内插槽的搜索按钮 */ append?: boolean; /** * 后置内插槽的搜索按钮是否将表单内容提交给浏览器 */ nativeType?: 'submit' | 'button' | 'reset'; /** * 禁用整个组件 */ disabled?: boolean; /** * select或radio的选项配置 */ options: OptionItem[] | CheckSelectOptionItem[]; /** * 输入框默认提示文本 */ placeholder?: string; /** * select的其他属性 */ selectProps?: SelectProps; /** * 组件大小 */ size?: 'large' | 'small' | 'default'; /** * 后置内插槽内容,下拉框还是按钮,默认是按钮 */ appendType?: 'select' | 'button'; /** * 按钮文本 */ buttonText?: string; } export interface SimpleInputEmit { /** * 查询按钮点击事件 */ (e: 'click', value?: Array): void; } export interface SimpleInputSlots { /** * after外插槽 */ after?: (props?: any) => any; /** * 前置内插槽 */ prefix?: () => any; /** * 后置内插槽 */ suffix?: () => any; }