UNPKG

ranui

Version:

UI Component library based on `Web Component`

115 lines (114 loc) 3.56 kB
import '@/components/select/option'; import '@/components/dropdown'; import '@/components/select/dropdown-item'; import '@/components/icon'; import '@/components/input'; import type { Input } from '@/components/input'; interface Option { label: string | number; value: string | number; } declare const Select_base: { new (): HTMLElement; prototype: HTMLElement; }; export declare class Select extends Select_base { removeTimeId?: NodeJS.Timeout; _slot: HTMLSlotElement; _shadowDom: ShadowRoot; _select: HTMLDivElement; _selection: HTMLDivElement; _search: Input; _icon: HTMLElement; _selectDropdown?: HTMLDivElement; _selectionDropdown?: HTMLElement; _selectDropDownInTimeId?: NodeJS.Timeout; _selectDropDownOutTimeId?: NodeJS.Timeout; _optionList: Option[]; _optionLabelMapValue: Map<string, string>; _optionValueMapLabel: Map<string, string>; _activeOption?: HTMLElement; _text: HTMLSpanElement; _selector: HTMLDivElement; onSearch?: (this: HTMLElement, ev: Event) => unknown; static get observedAttributes(): string[]; constructor(); get value(): string; set value(value: string); get defaultValue(): string; set defaultValue(value: string); get showSearch(): string; set showSearch(value: string); get type(): string; set type(value: string); get placement(): string; set placement(value: string); get sheet(): string; set sheet(value: string); get getPopupContainerId(): string; set getPopupContainerId(value: string); get dropdownclass(): string; set dropdownclass(value: string); get trigger(): string; set trigger(value: string); get disabled(): boolean; set disabled(value: boolean | string | undefined | null); handlerExternalCss(): void; /** * @description: 移除 select dropdown * @return {*} */ setSelectDropdownDisplayNone: () => void; /** * @description: 添加 select dropdown * @return {*} */ setSelectDropdownDisplayBlock: () => void; placementPosition: () => void; /** * @description: 设置下拉框 * @return {*} */ selectMouseDown: (e: Event) => void; removeDropDownTimeId: (e: Event) => void; /** * @description: 焦点移除的情况,需要移除 select 下拉框 * @return {*} */ selectBlur: (e: Event) => void; /** * @description: 选中一个选项的情况 * @param {MouseEvent} e * @return {*} */ clickOption: (e: MouseEvent) => void; /** * @description: 初始化创建选项下拉框 * @return {*} */ createOption: () => void; /** * @description: 移除选项下拉框 * @return {*} */ removeSelectDropdown: () => void; /** * @description: 当 select 中有 option 元素的时候,给 dropdown 添加元素 * @return {*} */ addOptionToSlot: () => void; createSelectDropdownContent: (options?: Option[]) => void; setDefaultValue: () => void; changeSearch: (e: Event) => void; setShowSearch: () => void; removeShowSearch: () => void; listenSlotChange: () => void; removeListenSlotChange: () => void; listenActionEvent: () => void; clickRemoveSelect: (e: Event) => void; connectedCallback(): void; disconnectCallback(): void; attributeChangedCallback(name: string, oldValue: string, newValue: string): void; } declare const _default: import("@/utils/index").CustomErrorType; export default _default;