ranui
Version:
UI Component library based on `Web Component`
92 lines (91 loc) • 2.57 kB
TypeScript
import '@/components/popover/content';
import '@/components/dropdown';
export type PlacementDirection = Record<string, Record<string, string>>;
export declare enum PLACEMENT_TYPE {
TOP = "top",
BOTTOM = "bottom",
LEFT = "left",
RIGHT = "right"
}
declare const Popover_base: {
new (): HTMLElement;
prototype: HTMLElement;
};
export declare class Popover extends Popover_base {
_slot: HTMLSlotElement;
popoverBlock: HTMLDivElement;
popoverContent?: HTMLElement;
popoverInner?: HTMLDivElement;
popoverInnerBlock?: HTMLDivElement;
_shadowDom: ShadowRoot;
dropDownInTimeId?: NodeJS.Timeout;
dropDownOutTimeId?: NodeJS.Timeout;
removeTimeId?: NodeJS.Timeout;
static get observedAttributes(): string[];
readonly closePopover: () => void;
constructor();
get placement(): string;
set placement(value: string);
get arrow(): string;
set arrow(value: string);
get trigger(): string;
set trigger(value: string);
get getPopupContainerId(): string;
set getPopupContainerId(value: string);
stopPropagation: (e: Event) => void;
/**
* @description: 创建下拉框
* @param {HTMLCollection} content
* @return {*}
*/
createContent: (content: HTMLCollection) => void;
/**
* @description: 观察内容变化
* @param {Event} e
* @return {*}
*/
watchContent: (e: Event) => void;
/**
* @description: 焦点移除的情况,需要移除下拉框
* @return {*}
*/
blur: any;
/**
* @description: 移除下拉框
* @return {*}
*/
removeDropDownTimeId: any;
/**
* @description: 添加 dropdown
* @return {*}
*/
setDropdownDisplayBlock: any;
/**
* @description: 移除 select dropdown
* @return {*}
*/
setDropdownDisplayNone: any;
/**
* @description: 设置 popover 位置
* @param {*} void
* @return {*}
*/
placementPosition: () => void;
/**
* @description: 鼠标移入
* @param {Event} e
* @return {*}
*/
hoverPopover: (e: Event) => void;
clickContent: (e: Event) => void;
clickPopover: (e: Event) => void;
clickRemovePopover: (e: Event) => void;
popoverTrigger: () => void;
hoverRemovePopover: (e: Event) => void;
changePlacement: any;
connectedCallback(): void;
disconnectCallback(): void;
attributeChangedCallback(n: string, o: string, v: string): void;
}
declare const _default: import("@/utils/index").CustomErrorType;
export default _default;