UNPKG

vuux

Version:

Vue3 Nuxt3 Nuxt4 组件库

24 lines (23 loc) 828 B
import { Ref } from 'vue'; import { Emits, Props } from '../types'; /** * hook * * @param props 组件属性 * @param wrapperRef 实例 * @param emits 组件事件 */ export declare const useAutoComplete: (props: Props, wrapperRef: Ref<HTMLDivElement | null>, emits: Emits) => { inputValue: Ref<string, string>; loading: Ref<boolean, boolean>; showDropdown: Ref<boolean, boolean>; filteredOptions: Ref<Record<string, any>[], Record<string, any>[]>; highlightIndex: Ref<number, number>; startIndex: Ref<number, number>; visibleOptions: import('vue').ComputedRef<Record<string, any>[]>; clearInput: () => void; selectItem: (item: Record<string, any>) => void; onInputBox: (e: Event) => void; onInputClick: () => void; highlightMatch: (item: Record<string, any>) => string; };