form-raw-item-provider.ts 731 字节
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
import { FormRawItemModel } from '@ibiz-template/model';
import {
  FormContainerController,
  FormController,
  FormRawItemController,
  IFormDetailProvider,
} from '@ibiz-template/controller';
/**
 * 表单项适配器
 *
 * @author lxm
 * @date 2022-09-19 22:09:03
 * @export
 * @class FormRawItemProvider
 * @implements {EditorProvider}
 */
export class FormRawItemProvider implements IFormDetailProvider {
  component: string = 'FormRawItem';

  async createController(
    detailModel: FormRawItemModel,
    form: FormController,
    parent: FormContainerController | undefined,
  ): Promise<FormRawItemController> {
    const c = new FormRawItemController(detailModel, form, parent);
    await c.init();
    return c;
  }
}