UNPKG

jjb-lc-designable

Version:

基于alibaba-designable源码二次封装的表单设计器。

106 lines 2.31 kB
export const ArrayTable = { type: 'object', properties: { bordered: { type: 'boolean', 'x-decorator': 'FormItem', 'x-component': 'Switch', 'x-component-props': { defaultChecked: true } }, showHeader: { type: 'boolean', 'x-decorator': 'FormItem', 'x-component': 'Switch', 'x-component-props': { defaultChecked: true } }, sticky: { type: 'boolean', 'x-decorator': 'FormItem', 'x-component': 'Switch' }, size: { type: 'string', enum: ['large', 'small', 'middle'], 'x-decorator': 'FormItem', 'x-component': 'Select', 'x-component-props': { defaultValue: 'small' } }, tableLayout: { type: 'string', enum: ['auto', 'fixed'], 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { defaultValue: 'auto', optionType: 'button' } } } }; const Column = { type: 'object', properties: { title: { type: 'string', 'x-decorator': 'FormItem', 'x-component': 'Input' }, align: { type: 'string', enum: ['left', 'right', 'center'], 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { defaultValue: 'left', optionType: 'button' } }, colSpan: { type: 'number', 'x-decorator': 'FormItem', 'x-component': 'NumberPicker' }, width: { type: 'number', 'x-decorator': 'FormItem', 'x-component': 'NumberPicker' }, fixed: { type: 'string', enum: ['left', 'right', false], 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { optionType: 'button' } } } }; const Addition = { type: 'object', properties: { method: { type: 'string', enum: ['push', 'unshift'], 'x-decorator': 'FormItem', 'x-component': 'Radio.Group', 'x-component-props': { defaultValue: 'push', optionType: 'button' } }, defaultValue: { type: 'string', 'x-decorator': 'FormItem', 'x-component': 'ValueInput' } } }; ArrayTable.Column = Column; ArrayTable.Addition = Addition;