| | |
| | | |
| | | renderCell = (form) => { |
| | | const { getFieldDecorator } = form |
| | | const { editing, dataIndex, title, record, children, className, required, inputType } = this.props |
| | | const { editing, dataIndex, title, record, children, className, required, inputType, rules } = this.props |
| | | |
| | | return ( |
| | | <td className={className}> |
| | |
| | | { |
| | | required: required, |
| | | message: ['number', 'text', 'input'].includes(inputType) ? `${eTDict['form.required.input']} ${title}!` : `${eTDict['form.required.select']} ${title}!`, |
| | | } |
| | | }, |
| | | ...rules |
| | | ], |
| | | initialValue: inputType === 'multiStr' ? (record[dataIndex] ? record[dataIndex].split(',') : []) : record[dataIndex], |
| | | })(this.getInput(form))} |
| | |
| | | inputType: col.inputType, |
| | | dataIndex: col.dataIndex, |
| | | options: col.options || [], |
| | | rules: col.rules || [], |
| | | min: col.min || 0, |
| | | max: col.max || 500, |
| | | unlimit: col.unlimit, |