jjb-lc-designable
Version:
基于alibaba-designable源码二次封装的表单设计器。
125 lines (122 loc) • 2.87 kB
text/typescript
import { ISchema } from 'jjb-lc-formily/react'
export const FormLayout: ISchema = {
type: 'object',
properties: {
labelCol: {
type: 'number',
'x-decorator': 'FormItem',
'x-component': 'NumberPicker',
},
wrapperCol: {
type: 'number',
'x-decorator': 'FormItem',
'x-component': 'NumberPicker',
},
labelWidth: {
'x-decorator': 'FormItem',
'x-component': 'SizeInput',
},
wrapperWidth: {
'x-decorator': 'FormItem',
'x-component': 'SizeInput',
},
colon: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
'x-component-props': {
defaultChecked: true,
},
},
feedbackLayout: {
type: 'string',
enum: ['loose', 'terse', 'popover', 'none', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'loose',
},
},
size: {
type: 'string',
enum: ['large', 'small', 'default', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'default',
},
},
layout: {
type: 'string',
enum: ['vertical', 'horizontal', 'inline', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'horizontal',
},
},
tooltipLayout: {
type: 'string',
enum: ['icon', 'text', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'icon',
},
},
labelAlign: {
type: 'string',
enum: ['left', 'right', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'right',
},
},
wrapperAlign: {
type: 'string',
enum: ['left', 'right', null],
'x-decorator': 'FormItem',
'x-component': 'Select',
'x-component-props': {
defaultValue: 'left',
},
},
labelWrap: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
wrapperWrap: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
fullness: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
inset: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
},
shallow: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
'x-component-props': {
defaultChecked: true,
},
},
bordered: {
type: 'boolean',
'x-decorator': 'FormItem',
'x-component': 'Switch',
'x-component-props': {
defaultChecked: true,
},
},
},
}