UNPKG

hongluan-ui

Version:
186 lines (185 loc) 4.65 kB
import type { ExtractPropTypes, PropType } from 'vue'; import type Input from './input.vue'; export declare type InputAutoSize = { minRows?: number; maxRows?: number; } | boolean; export declare const inputProps: { ariaLabel: StringConstructor; /** * @description native input id */ id: { type: StringConstructor; default: any; }; /** * @description binding value */ modelValue: { type: PropType<string | number>; default: string; }; /** * @description same as `maxlength` in native input */ maxlength: { type: (StringConstructor | NumberConstructor)[]; }; /** * @description same as `minlength` in native input */ minlength: { type: (StringConstructor | NumberConstructor)[]; }; nativeType: { type: StringConstructor; default: string; }; /** * @description input box size */ size: { type: PropType<"xxxs" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl">; validator: (val: string) => boolean; }; /** * @description control the resizability */ resize: { type: PropType<"horizontal" | "vertical" | "none" | "both">; validator: (val: string) => boolean; }; rows: { type: NumberConstructor; default: number; }; /** * @description whether textarea has an adaptive height */ autosize: { type: PropType<InputAutoSize>; default: InputAutoSize; }; /** * @description native input autocomplete */ autocomplete: { type: StringConstructor; default: string; }; /** * @description type of input */ type: { type: PropType<"success" | "info" | "warning" | "danger" | "link" | "primary">; validator: (val: string) => boolean; }; /** * @description format content */ formatter: { type: FunctionConstructor; }; /** * @description parse content */ parser: { type: FunctionConstructor; }; /** * @description placeholder */ placeholder: { type: StringConstructor; }; /** * @description native input form */ form: { type: StringConstructor; }; /** * @description whether to disable */ disabled: { type: BooleanConstructor; default: boolean; }; /** * @description native input readonly */ readonly: BooleanConstructor; /** * @description native input readonly */ clearable: BooleanConstructor; /** * @description toggleable password input */ showPassword: BooleanConstructor; /** * @description word count */ showWordLimit: BooleanConstructor; block: BooleanConstructor; /** * @deprecated native input aria-label */ label: { type: StringConstructor; default: any; }; /** * @description container role, internal properties provided for use by the picker component */ containerRole: { type: StringConstructor; default: any; }; /** * @description input tabindex */ tabindex: { type: (StringConstructor | NumberConstructor)[]; default: number; }; /** * @description whether to trigger form validation */ validateEvent: { type: BooleanConstructor; default: boolean; }; round: BooleanConstructor; fill: BooleanConstructor; thin: BooleanConstructor; /** * @description input or textarea element style */ inputStyle: { type: ObjectConstructor; default: () => {}; }; /** * @description native input autofocus */ autofocus: BooleanConstructor; }; export declare type InputProps = ExtractPropTypes<typeof inputProps>; export declare const inputEmits: { "update:modelValue": (value: string) => boolean; input: (value: string) => boolean; change: (value: string) => boolean; focus: (evt: FocusEvent) => boolean; blur: (evt: FocusEvent) => boolean; clear: () => boolean; mouseleave: (evt: MouseEvent) => boolean; mouseenter: (evt: MouseEvent) => boolean; keydown: (evt: KeyboardEvent | Event) => boolean; compositionstart: (evt: CompositionEvent) => boolean; compositionupdate: (evt: CompositionEvent) => boolean; compositionend: (evt: CompositionEvent) => boolean; }; export declare type InputEmits = typeof inputEmits; export declare type InputInstance = InstanceType<typeof Input>;