UNPKG

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