import type { PropType } from 'vue-demi'; import { Select as ElSelect } from 'element-ui'; import { plainProps } from '@xiaohaih/condition-core'; import { commonProps, formItemProps } from '../share'; // @ts-expect-error UI.props报错 const a = { ...ElSelect.props } as {}; // @ts-expect-error UI.props报错 delete a.value; export const selectProps = { ...a, ...plainProps, ...commonProps, ...formItemProps, /** 展示的字段 */ labelKey: { type: String as PropType, default: 'label' }, /** 提交的字段 */ valueKey: { type: String as PropType, default: 'value' }, /** 是否可过滤 */ filterable: { type: Boolean as PropType, default: true }, /** 是否可清除 */ clearable: { type: Boolean as PropType, default: true }, /** 过滤方法 */ filterMethod: { type: Function as unknown as PropType<(val: string, option: unknown) => boolean> }, } as const;