UNPKG

864 BTypeScriptView Raw
1/**
2 * @description panel class
3 * @author wangfupeng
4 */
5import { DomElement } from '../../utils/dom-core';
6import PanelMenu from './PanelMenu';
7declare type _TabEventConf = {
8 selector: string;
9 type: string;
10 fn: Function;
11};
12export declare type PanelTabConf = {
13 title: string;
14 tpl: string;
15 events: _TabEventConf[];
16};
17export declare type PanelConf = {
18 width: number | 0;
19 height: number | 0;
20 tabs: PanelTabConf[];
21};
22declare class Panel {
23 static createdMenus: Set<PanelMenu>;
24 private menu;
25 private conf;
26 $container: DomElement;
27 constructor(menu: PanelMenu, conf: PanelConf);
28 /**
29 * 创建并展示 panel
30 */
31 create(): void;
32 /**
33 * 移除 penal
34 */
35 remove(): void;
36 /**
37 * 隐藏当前所有的 panel
38 */
39 static hideCurAllPanels(): void;
40}
41export default Panel;