| | |
| | | { required: item.required, message: '请输入' + item.label + '!' } |
| | | ] |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | if (this.record.type === 'select' || this.record.type === 'link') { |
| | | extra = <span className="add-resource-empty" onClick={this.handleEmpty}>空</span> |
| | |
| | | content = <CodeMirror /> |
| | | } else if (item.type === 'textarea') { |
| | | span = 24 |
| | | className = 'text-msg' |
| | | rules = [ |
| | | { required: item.required, message: '请输入' + item.label + '!' } |
| | | ] |
| | |
| | | content = <TextArea rows={item.rows || 4}/> |
| | | } else if (item.type === 'options') { |
| | | span = 24 |
| | | className = 'text-area' |
| | | |
| | | let type = this.record.type |
| | | let linkSubFields = this.record.linkSubField || [] |
| | |
| | | columns.push({ title: 'url', key: '$url', type: 'file' }) |
| | | } else if (this.record.display === 'color') { |
| | | columns.push({ title: 'Color', key: '$color' }) |
| | | extra = <span>使用十六进制色彩代码(HEX)时,请在色值前添加 #</span> |
| | | } |
| | | |
| | | fields.forEach(item => { |
| | |
| | | } |
| | | } else if (item.type === 'fields') { |
| | | span = 24 |
| | | className = 'text-area' |
| | | rules = [ |
| | | { required: item.required, message: '请添加' + item.label + '!' } |
| | | ] |