From 977ce3d348f898d64ea240c8397b83d3e1cc5bb4 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期三, 18 十二月 2019 09:23:05 +0800 Subject: [PATCH] 2019-12-18 --- src/templates/comtableconfig/columnform/index.jsx | 21 +++++++++++++-------- 1 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/templates/comtableconfig/columnform/index.jsx b/src/templates/comtableconfig/columnform/index.jsx index 17547c5..c7365a2 100644 --- a/src/templates/comtableconfig/columnform/index.jsx +++ b/src/templates/comtableconfig/columnform/index.jsx @@ -1,6 +1,6 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Select, InputNumber, Radio } from 'antd' +import { Form, Row, Col, Input, Select, InputNumber, Radio, Tooltip, Icon } from 'antd' import './index.scss' class MainSearch extends Component { @@ -19,11 +19,11 @@ let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width'] if (_type === 'text') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color'] } else if (_type === 'number') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'match', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color'] } else if (_type === 'textarea') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color'] } this.setState({ @@ -44,11 +44,11 @@ let _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width'] if (value === 'text') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color'] } else if (value === 'number') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'match', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'match', 'matchVal', 'color'] } else if (value === 'textarea') { - _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'matchVal', 'color'] + _options = ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'matchVal', 'color'] } this.setState({ @@ -85,7 +85,12 @@ if (item.type === 'text') { // 鏂囨湰鎼滅储 fields.push( <Col span={12} key={index}> - <Form.Item label={item.label}> + <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