| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- import { Component } from 'vue';
- import type { TooltipInstance } from 'element-plus/es/components/tooltip';
- import type { ScrollbarInstance } from 'element-plus/es/components/scrollbar';
- import type { ISelectProps, SelectEmits } from './select';
- import type { OptionPublicInstance, OptionValue, SelectStates } from './type';
- export declare const useSelect: (props: ISelectProps, emit: SelectEmits) => {
- inputId: import("vue").Ref<string | undefined>;
- contentId: import("vue").Ref<string>;
- nsSelect: {
- namespace: import("vue").ComputedRef<string>;
- b: (blockSuffix?: string) => string;
- e: (element?: string) => string;
- m: (modifier?: string) => string;
- be: (blockSuffix?: string, element?: string) => string;
- em: (element?: string, modifier?: string) => string;
- bm: (blockSuffix?: string, modifier?: string) => string;
- bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
- is: {
- (name: string, state: boolean | undefined): string;
- (name: string): string;
- };
- cssVar: (object: Record<string, string>) => Record<string, string>;
- cssVarName: (name: string) => string;
- cssVarBlock: (object: Record<string, string>) => Record<string, string>;
- cssVarBlockName: (name: string) => string;
- };
- nsInput: {
- namespace: import("vue").ComputedRef<string>;
- b: (blockSuffix?: string) => string;
- e: (element?: string) => string;
- m: (modifier?: string) => string;
- be: (blockSuffix?: string, element?: string) => string;
- em: (element?: string, modifier?: string) => string;
- bm: (blockSuffix?: string, modifier?: string) => string;
- bem: (blockSuffix?: string, element?: string, modifier?: string) => string;
- is: {
- (name: string, state: boolean | undefined): string;
- (name: string): string;
- };
- cssVar: (object: Record<string, string>) => Record<string, string>;
- cssVarName: (name: string) => string;
- cssVarBlock: (object: Record<string, string>) => Record<string, string>;
- cssVarBlockName: (name: string) => string;
- };
- states: {
- inputValue: string;
- options: Map<OptionValue, OptionPublicInstance>;
- cachedOptions: Map<OptionValue, OptionPublicInstance>;
- optionValues: OptionValue[];
- selected: {
- value: OptionValue;
- currentLabel: OptionPublicInstance["currentLabel"];
- isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
- }[];
- hoveringIndex: number;
- inputHovering: boolean;
- selectionWidth: number;
- collapseItemWidth: number;
- previousQuery: string | null;
- selectedLabel: string;
- menuVisibleOnFocus: boolean;
- isBeforeHide: boolean;
- };
- isFocused: import("vue").Ref<boolean>;
- expanded: import("vue").Ref<boolean>;
- optionsArray: import("vue").ComputedRef<OptionPublicInstance[]>;
- hoverOption: import("vue").Ref<any>;
- selectSize: import("vue").ComputedRef<"" | "small" | "default" | "large">;
- filteredOptionsCount: import("vue").ComputedRef<number>;
- updateTooltip: () => void;
- updateTagTooltip: () => void;
- debouncedOnInputChange: import("lodash").DebouncedFunc<() => void>;
- onInput: (event: Event) => void;
- deletePrevTag: (e: KeyboardEvent) => void;
- deleteTag: (event: MouseEvent, tag: OptionPublicInstance | SelectStates["selected"][0]) => void;
- deleteSelected: (event: Event) => void;
- handleOptionSelect: (option: OptionPublicInstance) => void;
- scrollToOption: (option: OptionPublicInstance | OptionPublicInstance[] | SelectStates["selected"]) => void;
- hasModelValue: import("vue").ComputedRef<boolean>;
- shouldShowPlaceholder: import("vue").ComputedRef<boolean>;
- currentPlaceholder: import("vue").ComputedRef<string>;
- mouseEnterEventName: import("vue").ComputedRef<"mouseenter" | null>;
- needStatusIcon: import("vue").ComputedRef<boolean>;
- showClose: import("vue").ComputedRef<boolean>;
- iconComponent: import("vue").ComputedRef<import("element-plus/es/utils").EpPropMergeType<(new (...args: any[]) => (string | Component) & {}) | (() => string | Component) | ((new (...args: any[]) => (string | Component) & {}) | (() => string | Component))[], unknown, unknown> | undefined>;
- iconReverse: import("vue").ComputedRef<string>;
- validateState: import("vue").ComputedRef<"" | "error" | "success" | "validating">;
- validateIcon: import("vue").ComputedRef<"" | Component>;
- showNewOption: import("vue").ComputedRef<boolean>;
- updateOptions: () => void;
- collapseTagSize: import("vue").ComputedRef<"default" | "small">;
- setSelected: () => void;
- selectDisabled: import("vue").ComputedRef<boolean | undefined>;
- emptyText: import("vue").ComputedRef<string | null>;
- handleCompositionStart: (event: CompositionEvent) => void;
- handleCompositionUpdate: (event: CompositionEvent) => void;
- handleCompositionEnd: (event: CompositionEvent) => void;
- onOptionCreate: (vm: OptionPublicInstance) => void;
- onOptionDestroy: (key: OptionValue, vm: OptionPublicInstance) => void;
- handleMenuEnter: () => void;
- focus: () => void;
- blur: () => void;
- handleClearClick: (event: Event) => void;
- handleClickOutside: (event: Event) => void;
- handleEsc: () => void;
- toggleMenu: () => void;
- selectOption: () => void;
- getValueKey: (item: OptionPublicInstance | SelectStates["selected"][0]) => any;
- navigateOptions: (direction: "prev" | "next") => void;
- dropdownMenuVisible: import("vue").WritableComputedRef<boolean>;
- showTagList: import("vue").ComputedRef<{
- value: OptionValue;
- currentLabel: OptionPublicInstance["currentLabel"];
- isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
- }[]>;
- collapseTagList: import("vue").ComputedRef<{
- value: OptionValue;
- currentLabel: OptionPublicInstance["currentLabel"];
- isDisabled?: OptionPublicInstance["isDisabled"] | undefined;
- }[]>;
- popupScroll: (data: {
- scrollTop: number;
- scrollLeft: number;
- }) => void;
- tagStyle: import("vue").ComputedRef<{
- maxWidth: string;
- }>;
- collapseTagStyle: import("vue").ComputedRef<{
- maxWidth: string;
- }>;
- popperRef: import("vue").ComputedRef<HTMLElement | undefined>;
- inputRef: import("vue").Ref<HTMLInputElement | undefined>;
- tooltipRef: import("vue").Ref<TooltipInstance | undefined>;
- tagTooltipRef: import("vue").Ref<TooltipInstance | undefined>;
- prefixRef: import("vue").Ref<HTMLElement | undefined>;
- suffixRef: import("vue").Ref<HTMLElement | undefined>;
- selectRef: import("vue").Ref<HTMLElement | undefined>;
- wrapperRef: import("vue").ShallowRef<HTMLElement | undefined>;
- selectionRef: import("vue").Ref<HTMLElement | undefined>;
- scrollbarRef: import("vue").Ref<ScrollbarInstance | undefined>;
- menuRef: import("vue").Ref<HTMLElement | undefined>;
- tagMenuRef: import("vue").Ref<HTMLElement | undefined>;
- collapseItemRef: import("vue").Ref<HTMLElement | undefined>;
- };
|