import snippets from './snippets'; export default { snippets, componentName: 'Form.Item', title: 'Form.Item', category: 'Form', props: [ { name: 'name', title: { label: 'Field name', tip: 'Field name' }, isRequired: true, propType: 'string', setter: 'StringSetter', supportVariable: true }, { name: 'label', title: { label: 'Label', tip: 'Text of label' }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'labelAlign', title: { label: 'Label alignment', tip: 'Label text alignment' }, propType: { type: 'oneOf', value: ['left', 'right'] }, setter: { componentName: 'RadioGroupSetter', props: { options: [ { title: 'left', value: 'left', }, { title: 'right', value: 'right', }, ], }, }, defaultValue: 'right', }, { name: 'colon', title: { label: 'Show colon', tip: 'Used with the label attribute, it indicates whether to display the colon after the label', }, propType: 'bool', defaultValue: true, setter: 'BoolSetter', supportVariable: true }, { name: 'extra', title: { label: 'Prompt message', tip: 'Additional prompt information, similar to help, can be used when error information and prompt text need to appear at the same time. ', }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'tooltip', title: { label: 'Label prompt information', tip: 'Label prompt information, you can use this when you need to explain the label. ', }, propType: { type: 'oneOfType', value: ['string', 'node'] }, }, { name: 'required', title: { label: 'Required mark', tip: 'Required style setting. If not set, it will be automatically generated according to the verification rules.', }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true }, // { // name: 'hasFeedback', // title: { // label: 'Verification status icon', // tip: // 'Use it with the validateStatus attribute to display the verification status icon. It is recommended to only use it with the Input component', // }, // propType: 'bool', // defaultValue: false, // }, { name: 'initialValue', title: { label: 'Initial value', tip: 'Set the default value of the child element. If it conflicts with the initialValues of the Form, the Form will prevail', }, propType: 'string', setter: 'StringSetter', supportVariable: true }, { name: 'noStyle', title: { label: 'hide label', tip: 'When true, there is no style and it is used as a pure field control', }, propType: 'bool', defaultValue: false, setter: 'BoolSetter', supportVariable: true }, { name: 'valuePropName', title: { label: 'Subcomponent value field', tip: `The value field of the child node, such as Switch is 'checked'`, }, propType: 'string', defaultValue: 'value', setter: 'StringSetter', supportVariable: true }, { name: 'getValueFromEvent', title: { label: 'event converter', tip: `Set how to convert the event value into a field value, such as passing the fileList of the upload component as a value`, }, propType: 'func', }, { type: 'group', title: 'layout', display: 'accordion', items: [ { name: 'labelCol', title: 'Label grid layout settings', display: 'inline', setter: { componentName: 'ObjectSetter', props: { config: { items: [ { name: 'span', title: 'span', setter: { componentName: 'NumberSetter', props: { min: 0, max: 24, }, }, }, { name: 'offset', title: 'Offset', setter: { componentName: 'NumberSetter', props: { min: 0, max: 24, }, }, }, ], }, }, }, description: 'label label layout, same as `