Panel.d.ts 894 B

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