UNPKG

@daysnap/horn-ui

Version:

hron ui

15 lines (12 loc) 607 B
import type { ExtractPropTypes, InputHTMLAttributes, PropType } from 'vue' import { makeStringProp, makeNumericProp, makeBooleanProp } from '../utils' export const horInputProps = { type: makeStringProp<InputHTMLAttributes['type']>('text'), placeholder: makeStringProp('请输入'), maxlength: makeNumericProp(9999999), modelValue: makeNumericProp(''), disabled: makeBooleanProp(false), fractionDigits: makeNumericProp('2'), pattern: [Function, RegExp] as PropType<((value: string, preValue: string) => string) | RegExp>, } export type HorInputProps = ExtractPropTypes<typeof horInputProps>