UNPKG

904 BTypeScriptView Raw
1/**
2 * @description Tooltip class
3 * @author wangfupeng
4 */
5import { DomElement } from '../../utils/dom-core';
6import Editor from '../../editor/index';
7export declare type TooltipConfItemType = {
8 $elem: DomElement;
9 onClick: Function;
10};
11export declare type TooltipConfType = Array<TooltipConfItemType>;
12declare class Tooltip {
13 private $container;
14 private $targetElem;
15 private editor;
16 private conf;
17 private _show;
18 private _isInsertTextContainer;
19 constructor(editor: Editor, $elem: DomElement, conf: TooltipConfType);
20 /**
21 * 获取 tooltip 定位
22 */
23 private getPositionData;
24 /**
25 * 添加 tooltip 菜单
26 */
27 private appendMenus;
28 /**
29 * 创建 tooltip
30 */
31 create(): void;
32 /**
33 * 移除该 tooltip
34 */
35 remove(): void;
36 /**
37 * 是否显示
38 */
39 get isShow(): boolean;
40}
41export default Tooltip;