From bd06958321afa706f32287c71bd219eb0622c86c Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期二, 10 十二月 2019 16:31:45 +0800 Subject: [PATCH] 2019-12-10 --- src/templates/comtableconfig/actionform/index.jsx | 24 +++++++++++++----------- 1 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/templates/comtableconfig/actionform/index.jsx b/src/templates/comtableconfig/actionform/index.jsx index cf9a8d2..d850581 100644 --- a/src/templates/comtableconfig/actionform/index.jsx +++ b/src/templates/comtableconfig/actionform/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, Icon, Radio, notification } from 'antd' +import { Form, Row, Col, Input, Select, Icon, Radio, notification, Tooltip } from 'antd' import './index.scss' const { TextArea } = Input @@ -261,13 +261,14 @@ if (item.hidden) return if (item.type === 'text') { // 鏂囨湰鎼滅储 - let help = '' - if (item.key === 'sql') { - help = this.props.dict['header.form.actionhelp.datasource'] - } fields.push( <Col span={12} key={index}> - <Form.Item label={item.label} help={help}> + <Form.Item label={item.tooltip ? + <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> + <Icon type="question-circle" /> + {item.label} + </Tooltip> : item.label + }> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ @@ -281,13 +282,14 @@ </Col> ) } else if (item.type === 'select') { // 涓嬫媺鎼滅储 - let help = '' - if (item.key === 'sqlType') { - help = this.props.dict['header.form.actionhelp.sqlType'] - } fields.push( <Col span={12} key={index}> - <Form.Item label={item.label} help={help}> + <Form.Item label={item.tooltip ? + <Tooltip placement="topLeft" overlayClassName={item.tooltipClass} title={item.tooltip}> + <Icon type="question-circle" /> + {item.label} + </Tooltip> : item.label + }> {getFieldDecorator(item.key, { initialValue: item.initVal || '', rules: [ -- Gitblit v1.8.0