@daysnap/horn-ui
Version:
hron ui
27 lines (22 loc) • 997 B
text/typescript
import type { ExtractPropTypes } from 'vue'
import type { PickerColumn } from 'vant'
import { omit } from '@daysnap/utils'
import { horCellPickerProps } from '../hor-cell-picker'
import { horPickerProps } from '../hor-picker'
import { makeAnyProp, makeStringProp } from '../utils'
import type { PropType } from 'vue'
export const omitCellPickerInSelectPicker = omit(horCellPickerProps, ['modelValue'])
export const omitPickerInSelectPicker = omit(horPickerProps, ['value', 'columns'])
type Fn0ptions = (v?: any) => Promise<PickerColumn>
export const horSelectPickerProps = {
...omitCellPickerInSelectPicker,
...omitPickerInSelectPicker,
modelValue: makeAnyProp(''),
triggerType: makeStringProp<'immediately' | 'lazy'>('immediately'),
options: {
type: [Array, Function] as PropType<PickerColumn | Fn0ptions>,
default: () => [],
},
valueType: makeStringProp<'object' | 'string'>('string'),
}
export type HorSelectPickerProps = ExtractPropTypes<typeof horSelectPickerProps>