UNPKG

hongluan-ui

Version:
146 lines (145 loc) 3.77 kB
import type { ExtractPropTypes, PropType } from 'vue'; import type InputNumber from './input-number.vue'; export declare const inputNumberProps: { ariaLabel: StringConstructor; /** * @description same as `id` in native input */ id: { type: StringConstructor; default: any; }; /** * @description binding value */ modelValue: { type: NumberConstructor; }; /** * @description incremental step */ step: { type: NumberConstructor; default: number; }; /** * @description whether input value can only be multiple of step */ stepStrictly: { type: BooleanConstructor; default: boolean; }; /** * @description the maximum allowed value */ max: { type: NumberConstructor; default: number; }; /** * @description the minimum allowed value */ min: { type: NumberConstructor; default: number; }; /** * @description whether the component is disabled */ disabled: { type: BooleanConstructor; default: boolean; }; /** * @description size of the component */ size: { type: PropType<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">; validator: (val: string) => boolean; }; /** * @description whether to enable the control buttons */ controls: { type: BooleanConstructor; default: boolean; }; /** * @description position of the control buttons */ controlsPosition: { type: StringConstructor; default: string; }; /** * @description value should be set when input box is cleared */ valueOnClear: { type: (StringConstructor | NumberConstructor)[]; validator: (val: 'min' | 'max' | number | null) => boolean; default: any; }; /** * @description same as `name` in native input */ name: StringConstructor; /** * @deprecated same as `label` in native input */ label: StringConstructor; /** * @description same as `placeholder` in native input */ placeholder: StringConstructor; /** * @description same as `readonly` in native input */ readonly: BooleanConstructor; /** * @description precision of input value */ precision: { type: NumberConstructor; validator: (val: number) => boolean; }; /** * @description whether to trigger form validation */ validateEvent: { type: BooleanConstructor; default: boolean; }; merge: { type: BooleanConstructor; default: boolean; }; deepMerge: { type: BooleanConstructor; default: boolean; }; indent: { type: (BooleanConstructor | StringConstructor)[]; default: boolean; }; gap: { type: (BooleanConstructor | StringConstructor)[]; default: boolean; }; round: BooleanConstructor; fill: BooleanConstructor; block: BooleanConstructor; dir: { type: PropType<"horizontal" | "vertical">; default: string; }; }; export declare const inputNumberEmits: { change: (cur: number | undefined, prev: number | undefined) => boolean; blur: (e: FocusEvent) => boolean; focus: (e: FocusEvent) => boolean; input: (val: number | null | undefined) => boolean; "update:modelValue": (val: number | undefined) => boolean; }; export declare type InputNumberProps = ExtractPropTypes<typeof inputNumberProps>; export declare type InputNumberEmits = typeof inputNumberEmits; export declare type InputNumberInstance = InstanceType<typeof InputNumber>;