UNPKG

@daysnap/horn-ui

Version:

hron ui

27 lines (22 loc) 986 B
import { omit } from '@daysnap/utils' import type { ExtractPropTypes, PropType } from 'vue' import { makeBasicProp, makeStringProp, makeArrayProp, makeBooleanProp } from '../utils' import { horDatePickerProps } from '../hor-date-picker' import { horCellProps } from '../hor-cell' export const omitHorDatePickerPropsInDateRangePicker = omit(horDatePickerProps, [ 'modelValue', 'formatter', ]) export const omitHorCellPropsInDateRangePicker = omit(horCellProps, ['value']) export const horDateRangePickerProps = { ...omitHorDatePickerPropsInDateRangePicker, ...omitHorCellPropsInDateRangePicker, disabled: makeBooleanProp(false), modelValue: makeArrayProp<string>(), label: makeBasicProp(''), startPlaceholder: makeStringProp('开始时间'), endPlaceholder: makeStringProp('结束时间'), rangeSeparator: makeStringProp('至'), valueFormat: makeStringProp('yyyy-MM-dd'), } export type HorDateRangePickerProps = ExtractPropTypes<typeof horDateRangePickerProps>