xdesign-vue-next
Version:
XDesign Component for vue-next
32 lines (31 loc) • 1.39 kB
TypeScript
import { TdInputProps } from './type';
export interface ExtendsTdInputProps extends TdInputProps {
showInput: boolean;
keepWrapperWidth: boolean;
allowTriggerBlur: boolean;
}
export default function useInput(props: ExtendsTdInputProps, expose: (exposed: Record<string, any>) => void): {
isHover: import("vue").Ref<boolean>;
focused: import("vue").Ref<boolean>;
renderType: import("vue").Ref<"number" | "search" | "password" | "url" | "hidden" | "text" | "submit" | "tel">;
showClear: import("vue").ComputedRef<boolean>;
inputRef: import("vue").Ref<HTMLInputElement>;
clearIconRef: any;
inputValue: import("vue").Ref<string>;
isComposition: import("vue").Ref<boolean>;
compositionValue: import("vue").Ref<string>;
limitNumber: import("vue").ComputedRef<string>;
tStatus: import("vue").ComputedRef<"error" | "default" | "" | "success" | "warning">;
emitFocus: (e: FocusEvent) => void;
formatAndEmitBlur: (e: FocusEvent) => void;
onHandleCompositionend: (e: CompositionEvent) => void;
onHandleCompositionstart: (e: CompositionEvent) => void;
onRootClick: (e: MouseEvent) => void;
emitPassword: () => void;
handleInput: (e: InputEvent) => void;
emitClear: ({ e }: {
e: MouseEvent;
}) => void;
onClearIconMousedown: (e: MouseEvent) => void;
innerValue: import("vue").Ref<string>;
};