From 73d56e1024cf420eff2aae3710886c84d56a385f Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期六, 04 六月 2022 14:48:36 +0800 Subject: [PATCH] 2022-06-04 --- src/menu/components/share/usercomponent/settingform/index.jsx | 55 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 29 insertions(+), 26 deletions(-) diff --git a/src/menu/components/share/usercomponent/settingform/index.jsx b/src/menu/components/share/usercomponent/settingform/index.jsx index 50613ac..d918739 100644 --- a/src/menu/components/share/usercomponent/settingform/index.jsx +++ b/src/menu/components/share/usercomponent/settingform/index.jsx @@ -1,8 +1,9 @@ import React, {Component} from 'react' import PropTypes from 'prop-types' -import { Form, Row, Col, Input, Tooltip, Icon } from 'antd' +import { Form, Row, Col, Input, Tooltip } from 'antd' +import { QuestionCircleOutlined } from '@ant-design/icons' -import './index.scss' +// import './index.scss' class SettingForm extends Component { static propTpyes = { @@ -53,30 +54,32 @@ } return ( - <div className="model-menu-setting-form"> - <Form {...formItemLayout}> - <Row gutter={24}> - <Col span={22}> - <Form.Item label={ - <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�"> - <Icon type="question-circle" /> - 缁勪欢鍚嶇О - </Tooltip> - }> - {getFieldDecorator('name', { - initialValue: this.props.name || '', - rules: [ - { - required: true, - message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!' - } - ] - })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} - </Form.Item> - </Col> - </Row> - </Form> - </div> + <Form {...formItemLayout}> + <Row gutter={24}> + <Col span={22}> + <Form.Item label={ + <Tooltip placement="topLeft" title="鐢ㄤ簬缁勪欢闂寸殑鍖哄垎銆�"> + <QuestionCircleOutlined className="mk-form-tip" /> + 缁勪欢鍚嶇О + </Tooltip> + }> + {getFieldDecorator('name', { + initialValue: this.props.name || '', + rules: [ + { + required: true, + message: this.props.dict['form.required.input'] + '缁勪欢鍚嶇О!' + }, + { + max: 15, + message: '缁勪欢鍚嶇О鏈�澶�15涓瓧绗�!' + } + ] + })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)} + </Form.Item> + </Col> + </Row> + </Form> ) } } -- Gitblit v1.8.0