UNPKG

element-plus

Version:

A Component Library for Vue 3

150 lines (149 loc) 5.61 kB
import type { AutocompleteProps } from './autocomplete'; import type { StyleValue } from 'vue'; import type { TooltipInstance } from 'element-plus/es/components/tooltip'; import type { InputInstance } from 'element-plus/es/components/input'; declare var __VLS_29: {}, __VLS_32: {}, __VLS_35: {}, __VLS_38: {}, __VLS_41: {}, __VLS_48: {}, __VLS_60: { item: Record<string, any>; }, __VLS_62: {}; type __VLS_Slots = {} & { prepend?: (props: typeof __VLS_29) => any; } & { append?: (props: typeof __VLS_32) => any; } & { prefix?: (props: typeof __VLS_35) => any; } & { suffix?: (props: typeof __VLS_38) => any; } & { header?: (props: typeof __VLS_41) => any; } & { loading?: (props: typeof __VLS_48) => any; } & { default?: (props: typeof __VLS_60) => any; } & { footer?: (props: typeof __VLS_62) => any; }; declare const __VLS_base: import("vue").DefineComponent<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<AutocompleteProps>, { valueKey: string; modelValue: string; debounce: number; placement: string; fetchSuggestions: () => void; triggerOnFocus: boolean; loopNavigation: boolean; teleported: boolean; disabled: undefined; modelModifiers: () => {}; type: import("element-plus/es/components/input").InputType; autocomplete: "off"; clearIcon: any; wordLimitPosition: "inside"; tabindex: 0; validateEvent: true; inputStyle: () => {}; rows: 2; }>, { /** @description the index of the currently highlighted item */ highlightedIndex: import("vue").Ref<number>; /** @description autocomplete whether activated */ activated: import("vue").Ref<boolean>; /** @description remote search loading status */ loading: import("vue").Ref<boolean>; /** @description el-input component instance */ inputRef: import("vue").Ref<InputInstance | undefined>; /** @description el-tooltip component instance */ popperRef: import("vue").Ref<TooltipInstance | undefined>; /** @description fetch suggestions result */ suggestions: import("vue").Ref<Record<string, any>[]>; /** @description triggers when a suggestion is clicked */ handleSelect: (item: any) => Promise<void>; /** @description handle keyboard enter event */ handleKeyEnter: () => Promise<void>; /** @description focus the input element */ focus: () => void; /** @description blur the input element */ blur: () => void; /** @description close suggestion */ close: () => void; /** @description highlight an item in a suggestion */ highlight: (index: number) => void; /** @description loading suggestion list */ getData: (queryString: string) => Promise<void>; }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, { select: (item: Record<string, any>) => void; focus: (evt: FocusEvent) => void; "update:modelValue": (value: string | number) => void; change: (value: string | number) => void; input: (value: string | number) => void; clear: () => void; blur: (evt: FocusEvent) => void; }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaultsLocal<__VLS_TypePropsToOption<AutocompleteProps>, { valueKey: string; modelValue: string; debounce: number; placement: string; fetchSuggestions: () => void; triggerOnFocus: boolean; loopNavigation: boolean; teleported: boolean; disabled: undefined; modelModifiers: () => {}; type: import("element-plus/es/components/input").InputType; autocomplete: "off"; clearIcon: any; wordLimitPosition: "inside"; tabindex: 0; validateEvent: true; inputStyle: () => {}; rows: 2; }>>> & { "onUpdate:modelValue"?: ((value: string | number) => any) | undefined; onSelect?: ((item: Record<string, any>) => any) | undefined; onInput?: ((value: string | number) => any) | undefined; onFocus?: ((evt: FocusEvent) => any) | undefined; onChange?: ((value: string | number) => any) | undefined; onBlur?: ((evt: FocusEvent) => any) | undefined; onClear?: (() => any) | undefined; }, { disabled: boolean; tabindex: string | number; type: import("element-plus/es/components/input").InputType; modelValue: string | number; placement: import("./autocomplete").AutocompletePlacement; teleported: boolean; modelModifiers: import("element-plus/es/components/input").InputModelModifiers; autocomplete: string; clearIcon: string | import("vue").Component; wordLimitPosition: "inside" | "outside"; validateEvent: boolean; inputStyle: string | false | import("vue").CSSProperties | StyleValue[] | null; rows: number; valueKey: string; debounce: number; fetchSuggestions: import("./autocomplete").AutocompleteFetchSuggestions; triggerOnFocus: boolean; loopNavigation: boolean; }, {}>; declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>; declare const _default: typeof __VLS_export; export default _default; type __VLS_TypePropsToOption<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? { type: import('vue').PropType<Required<T>[K]>; } : { type: import('vue').PropType<T[K]>; required: true; }; }; type __VLS_WithDefaultsLocal<P, D> = { [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & { default: D[K]; }> : P[K]; }; type __VLS_WithSlots<T, S> = T & { new (): { $slots: S; }; }; type __VLS_PrettifyLocal<T> = { [K in keyof T as K]: T[K]; } & {};