feat: 表单支持slot形式的自定义组件

This commit is contained in:
gaoyunqi
2024-03-06 18:33:49 +08:00
parent ebd405c3e5
commit 8b0921f1dc
4 changed files with 10 additions and 2 deletions

View File

@ -5,6 +5,7 @@
<div :style="{}" class="form-right">
<div v-for="(item, index) in forms.configs" :key="index" :tab="item.formName">
<div v-show="activeIndex == index">
<!-- 如果是生成文件模式 formType = 0也就是FormType.SYSTEM会加载对应项目的Form.vue-->
<SystemForm v-if="item.formType == FormType.SYSTEM" :ref="setItemRef" :formModel="item.formModel" :isViewProcess="props.disabled" :systemComponent="item.systemComponent" :workflowConfig="item" class="form-box" />
<SimpleForm v-else-if="item.formType == FormType.CUSTOM" :ref="setItemRef" :formModel="item.formModel" :formProps="item.formProps" :isWorkFlow="true" class="form-box" />
</div>