UNPKG

@daysnap/horn-ui

Version:

hron ui

34 lines (29 loc) 905 B
import type { ExtractPropTypes } from 'vue' import { omit } from '@daysnap/utils' import { horCellProps } from '../hor-cell' import { makeArrayProp, makeBooleanProp, makeNumericProp, makeStringProp } from '../utils' export type HorCheckboxButtonOptionItem = { label: string valueKey?: string value: string disabled?: boolean [key: string]: any } const partialCellProps = omit(horCellProps, [ 'value', 'arrow', 'ellipsis', 'formatter', 'lineClamp', 'alignItemCenter', ]) export const horCheckboxButtonProps = { ...partialCellProps, disabled: makeBooleanProp(false), span: makeNumericProp('3'), //仅column模式生效 options: makeArrayProp<HorCheckboxButtonOptionItem>(), valueKey: makeStringProp('value'), max: makeNumericProp(0), modelValue: makeArrayProp<string | number>(), } export type HorCheckboxButtonProps = ExtractPropTypes<typeof horCheckboxButtonProps>