| | |
| | | let className = '' |
| | | let content = null |
| | | let initVal = item.initVal || '' |
| | | let help = item.help || '' |
| | | |
| | | if (item.type === 'splitLine') { |
| | | fields.push( |
| | |
| | | filterOption={(input, option) => option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 || |
| | | option.props.extend.toLowerCase().indexOf(input.toLowerCase()) >= 0} |
| | | onChange={(value) => {this.optionChange(item.key, value)}} |
| | | on |
| | | getPopupContainer={() => document.getElementById('winter')} |
| | | > |
| | | {item.options.map((option, index) => |
| | |
| | | { required: item.required, message: '请选择' + item.label + '!' } |
| | | ] |
| | | |
| | | content = <MkPrintTemps /> |
| | | content = <MkPrintTemps onChange={(value) => {this.optionChange(item.key, value)}}/> |
| | | } else if (item.type === 'keyinterface') { |
| | | span = 24 |
| | | className = 'textarea' |
| | |
| | | content = <KeyInterface type={item.key === 'exInterface' ? 'develop' : 'product'}/> |
| | | } |
| | | |
| | | if (help && /func:/.test(help)) { |
| | | try { |
| | | // eslint-disable-next-line |
| | | let func = new Function('record', help.replace(/func:/, '')) |
| | | help = func(this.record) |
| | | if (help) { |
| | | help = <span dangerouslySetInnerHTML={{ __html: help }}></span> |
| | | } |
| | | } catch (e) { |
| | | help = '' |
| | | console.warn(e) |
| | | } |
| | | } |
| | | |
| | | fields.push( |
| | | <Col span={span} key={index}> |
| | | <Form.Item className={className} help={item.help} label={item.tooltip ? |
| | | <Form.Item className={className} help={help} label={item.tooltip ? |
| | | <Tooltip placement="topLeft" overlayStyle={{maxWidth: item.tooltip.length > 25 ? 350 : 250 }} title={<span onClick={(e) => e.stopPropagation()}>{item.tooltip}</span>}> |
| | | <QuestionCircleOutlined className="mk-form-tip" /> |
| | | {item.label} |