import { Ref, VNode } from 'vue'; export type UseInputEmitsT = { (e: 'change', value: string, lastValue: string): void; (e: 'input', evt: Event, value: string): void; (e: 'focus', evt: FocusEvent): void; (e: 'blur', evt: FocusEvent): void; (e: 'clear', evt?: Event): void; (e: 'pressEnter', evt: KeyboardEvent): void; }; export interface InputOptionT { modelValue?: Ref; defaultValue?: string; emits: UseInputEmitsT; emitUpdate: (value: string) => void; validate?: (value: string) => boolean; valueOnInvalidChange?: boolean | ((inputValue: string, lastValidInputValue: string) => string); format?: (value: string) => string; maxLength?: Ref; minLength?: Ref; showLength?: Ref<'always' | 'auto' | 'never' | ((length: number) => string | VNode)>; calculateLength?: (value: string) => number; inputOnOutlimit?: Ref; onlyNumericInput?: Ref; } /** * 输入框 */ export declare function useInput(options: InputOptionT): { realValue: import('vue').ComputedRef; displayValue: import('vue').ComputedRef; isValid: Ref; inputEl: Ref; clearValue: () => void; isFocus: Ref; inputValueLength: import('vue').ComputedRef; isShowLength: import('vue').ComputedRef; isOutLengthLimit: import('vue').ComputedRef; handleInput: (e: Event) => void; handleFocus: (e: FocusEvent) => void; handleBlur: (e: FocusEvent) => void; handlePressEnter: (e: KeyboardEvent) => void; handleClear: (e: Event) => void; };