import { IPublicTypeComponentMetadata, IPublicTypeSnippet } from '@alilc/lowcode-types'; const FormCreatorMeta: IPublicTypeComponentMetadata = { componentName: 'FormCreator', title: '创建人', docUrl: '', screenshot: '', devMode: 'proCode', category: '自定义表单组件', group: '精选组件', npm: { package: 'temp-materials', version: '0.1.13', exportName: 'FormCreator', main: 'src\\index.tsx', destructuring: true, subName: '', }, configure: { props: [ { title: { label:'标题', tip:'表单项名称,后续生成表格时,转化为表格列名' }, name: 'title', setter: 'StringSetter', }, // 列数 { title: { label:'列数', tip:'设置组件自身的布局,可选择继承表单组件的值,有限度高于表单组件布局属性' }, name: 'column', setter: { componentName: 'RadioGroupSetter', props: { options: [ { label: '一栏', value: 24, }, { label: '两栏', value: 12, }, { label: '继承', value: 0, }, ], }, }, }, // 是否展示边框 { title: { label:'边框', tip:'组件是否显示边框' }, name: 'bordered', setter: 'BoolSetter', }, ], supports: { // style: true, }, component: { nestingRule: { parentWhitelist: ['Form'], }, }, }, }; const snippets: IPublicTypeSnippet[] = [ { title: '创建人', screenshot: '', schema: { componentName: 'FormCreator', props: { // 后端识别类型 fieldType: 'string', title: '创建人', bordered: true, }, }, }, ]; export default { ...FormCreatorMeta, snippets, };