import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; import CreateReportSetter from '../setter/CreateReportSetter'; const FormChildrenMeta: IPublicTypeComponentMetadata = { componentName: 'FormChildren', title: '子表单', docUrl: '', screenshot: '', devMode: 'proCode', category: '表单组件', group: '精选组件', npm: { package: 'temp-materials', version: '0.1.10', exportName: 'FormChildren', main: 'src\\index.tsx', destructuring: true, subName: '', }, configure: { props: [ { title: { label:'标题', tip:'表单项名称,后续生成表格时,转化为表格列名' }, name: 'title', setter: 'StringSetter', defaultValue: '子表单名称', }, // 列数 { title: { label:'列数', tip:'设置组件自身的布局,可选择继承表单组件的值,有限度高于表单组件布局属性' }, name: 'column', setter: { componentName: 'RadioGroupSetter', props: { options: [ { label: '一栏', value: 24, }, { label: '两栏', value: 12, }, { label: '继承', value: 0, }, ], }, }, }, // 校验规则 { display: 'block', title: { label:'校验', tip:'可选择内置的校验规则' }, name: 'reportId', setter: { componentName: CreateReportSetter, }, }, ], supports: { // style: true, }, component: { nestingRule: { parentWhitelist: ['Form'], }, }, }, }; const snippets: IPublicTypeSnippet[] = [ { title: '子表单', screenshot: '', schema: { componentName: 'FormChildren', props: { // 后端识别类型 fieldType: 'children', column: 24, }, }, }, ]; export default { ...FormChildrenMeta, snippets, };