import { PlusFormProps } from 'yc-pro-components/es/components'; import { PlusColumn, FieldValues, PlusColProps, PlusRowProps } from 'yc-pro-components/es/types'; import { Component } from 'vue'; export type PlusSearchSelfProps = { modelValue?: FieldValues; defaultValues?: FieldValues; columns?: PlusColumn[]; /** * 布局模式 * - flex: 传统 flexbox 布局,表单项固定宽度 * - grid: CSS Grid 响应式布局,表单项自动填充 * @default 'flex' */ layout?: 'flex' | 'grid'; hasFooter?: boolean; hasReset?: boolean; hasUnfold?: boolean; /** * 默认是否展开 * @version 0.1.24 * @default false */ defaultUnfold?: boolean; searchText?: string; resetText?: string; retractText?: string; expandText?: string; searchLoading?: boolean; inline?: boolean; showNumber?: number; labelPosition?: 'left' | 'right' | 'top'; rowProps?: PlusRowProps; colProps?: PlusColProps; /** * 搜索是否需要校验 ,默认不需要校验表单 * @variation v0.1.15 * @default false */ needValidate?: boolean; /** * 搜索按钮图标,传入 undefined 或 null 隐藏图标 */ searchIcon?: Component | undefined | null; /** * 重置按钮图标,传入 undefined 或 null 隐藏图标 */ resetIcon?: Component | undefined | null; }; export type PlusSearchProps = PlusSearchSelfProps & PlusFormProps; export interface PlusSearchEmits { (e: 'update:modelValue', values: FieldValues): void; (e: 'search', values: FieldValues): void; (e: 'change', values: FieldValues, column: PlusColumn): void; (e: 'reset', values: FieldValues): void; (e: 'collapse', isShowUnfold: boolean): void; }