UNPKG

852 BTypeScriptView Raw
1/**
2 * @description Menus 菜单栏 入口文件
3 * @author wangfupeng
4 */
5import Editor from '../editor/index';
6import Menu from './menu-constructors/Menu';
7import { MenuListType } from './menu-list';
8declare class Menus {
9 editor: Editor;
10 menuList: Menu[];
11 constructorList: MenuListType;
12 constructor(editor: Editor);
13 /**
14 * 自定义添加菜单
15 * @param key 菜单 key ,和 editor.config.menus 对应
16 * @param Menu 菜单构造函数
17 */
18 extend(key: string, Menu: any): void;
19 init(): void;
20 private _bindMenuTooltips;
21 private _addToToolbar;
22 /**
23 * 获取菜单对象
24 * @param 菜单名称 小写
25 * @return Menus 菜单对象
26 */
27 menuFind(key: string): Menu;
28 /**
29 * @description 修改菜单激活状态
30 */
31 changeActive(): void;
32}
33export default Menus;