vue-devui
Version:
DevUI components based on Vite and Vue3
29 lines (28 loc) • 1.52 kB
TypeScript
import { Ref } from 'vue';
import type { SetupContext } from 'vue';
import { SelectProps, OptionObjectItem } from './select-types';
export default function useSelect(props: SelectProps, selectRef: Ref<HTMLElement | undefined>, ctx: SetupContext, focus: () => void, blur: () => void, isSelectFocus: Ref<boolean>, t: (path: string) => unknown): {
selectDisabled: import("vue").ComputedRef<any>;
selectSize: import("vue").ComputedRef<import("./select-types").SelectSize>;
originRef: Ref<HTMLElement | undefined>;
dropdownRef: Ref<any>;
isOpen: Ref<boolean>;
selectCls: import("vue").ComputedRef<string>;
mergeOptions: import("vue").ComputedRef<OptionObjectItem[]>;
selectedOptions: import("vue").ComputedRef<OptionObjectItem[]>;
filterQuery: Ref<string>;
emptyText: import("vue").ComputedRef<string>;
isLoading: import("vue").ComputedRef<boolean>;
isShowEmptyText: import("vue").ComputedRef<boolean>;
handleClear: () => void;
valueChange: (item: OptionObjectItem) => void;
handleClose: () => void;
updateInjectOptions: (item: Record<string, unknown>, operation: string, isObject: boolean) => void;
tagDelete: (data: OptionObjectItem) => void;
onFocus: (e: FocusEvent) => void;
onBlur: (e: FocusEvent) => void;
isDisabled: (item: OptionObjectItem) => boolean;
toggleChange: (bool: boolean) => void;
debounceQueryFilter: import("lodash").DebouncedFunc<(query: string) => void>;
isShowCreateOption: import("vue").ComputedRef<boolean>;
};