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