interface ValidRule { validType?: import('@/utils').ValidKey; // 表达验证类型 ruleFn?: import('@/utils').RuleFn.ruleFn; errMsgFn?: (...args: any) => string; errMsg?: string; } interface Valid { validFormatType?: import('@/utils').InputTypeValue; // 用于验证格式化表单输入类型 validRules?: Array | ValidRule; } declare interface ValidProps { id: string; required: boolean; message: string; trigger: string; } declare interface ValidConfig extends Valid { validProps?: Partial; } declare interface anyObj { [key: string]: any; } declare interface OtherConfig { tip: boolean; tipMsg: string | ((param: any) => string); } declare type FunctionVoid = () => void; // 获取组件中 props 属性类型 declare type PickComponentsProps = { -readonly [K in keyof Omit< T, keyof import('vue').VNodeProps | keyof import('vue').AllowedComponentProps >]: T[K]; }; interface ColumnProps extends Partial { label: string | ((form: any) => string); width: string | number; } interface SelectOption extends Options { optionLabelKey?: string; optionValueKey?: string; } interface Options { options: any[]; } interface Supplement { maxlength: string; rows: number; } declare interface ItemConfig extends ValidConfig { itemType?: | 'number' | 'date' | 'select' | 'timeSelect' | 'text' | 'time' | 'radio' | 'checkbox' | 'other' | 'table' | 'dateTime'; modelKey?: string; // 表单输入项双向绑定 v-model 后端数据字段名 slotName?: string; dateRange?: boolean; default?: any; // 默认填充值 columnProps?: Partial; // input | datePicker | timePicker | inputNumber | select 选择器 elInputProps?: Partial; elDatePickerProps?: Partial; elTimePickerProps?: Partial; elInputNumberProps?: Partial; elSelectProps?: Partial; elRadioProps?: Partial; elCheckboxProps?: Partial; // el-form-item 的配置 elFormItemProps?: Partial; otherConfig?: OtherConfig; } declare interface PageConfig { id?: string; labelWidth?: string | number; items: ItemConfig[]; // form表单的配置同 element plus form formProps?: Partial; isDialogSearch?: boolean; } declare interface BtnLoading { btnLoading?: boolean; } declare interface StandardOptions { value: string | number; label: string; } declare interface TransformedItem extends StandardOptions { level?: number; disabled?: boolean; children?: TransformedItem[]; }