app-menu-portlet-provider.ts 824 字节
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
import {
  AppMenuPortletController,
  ContainerPortletController,
  DashboardController,
  IPortletPartProvider,
} from '@ibiz-template/controller';
import { PortletPartModel, AppMenuPortletModel } from '@ibiz-template/model';

/**
 * 数据看板成员快捷菜单适配器
 *
 * @author lxm
 * @date 2022-10-19 15:10:44
 * @export
 * @class AppMenuPortletProvider
 */
export class AppMenuPortletProvider implements IPortletPartProvider {
  component: string = 'PortletPart';

  async createController(
    portletModel: PortletPartModel,
    dashboard: DashboardController,
    parent?: ContainerPortletController,
  ): Promise<AppMenuPortletController> {
    const c = new AppMenuPortletController(
      portletModel as AppMenuPortletModel,
      dashboard,
      parent,
    );
    await c.init();
    return c;
  }
}