import { plainProps } from '@xiaohaih/condition-core'; import type { checkboxProps as CheckboxProps } from 'element-plus'; import { ElCheckbox } from 'element-plus'; import type { PropType } from 'vue'; import { commonProps, formItemProps } from '../share'; const { label, ...cheProps } = ElCheckbox.props as typeof CheckboxProps; export const checkboxProps = { ...cheProps, // ...emits2Props(ElCheckbox.emits), ...plainProps, ...commonProps, ...formItemProps, /** 展示的字段 */ labelKey: { type: String as PropType, default: 'label' }, /** 提交的字段 */ valueKey: { type: String as PropType, default: 'value' }, /** 按钮类型(checkbox|button), 默认 checkbox */ type: { type: String as PropType<'checkbox' | 'button'> }, /** 是否多选 */ multiple: { type: Boolean as PropType, default: true }, /** 选项禁用字段 */ disabledKey: { type: String as PropType, default: 'disabled' }, } as const;