From d0e8c7cb64d7d219f7cfec8bc87cf699b9cfe7b2 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 08 十一月 2022 12:35:25 +0800
Subject: [PATCH] 2022-11-08
---
src/menu/components/share/usercomponent/settingform/index.jsx | 57 ++++++++++++++++++++++++++++++---------------------------
1 files changed, 30 insertions(+), 27 deletions(-)
diff --git a/src/menu/components/share/usercomponent/settingform/index.jsx b/src/menu/components/share/usercomponent/settingform/index.jsx
index 7c45ae5..cd66103 100644
--- a/src/menu/components/share/usercomponent/settingform/index.jsx
+++ b/src/menu/components/share/usercomponent/settingform/index.jsx
@@ -1,12 +1,13 @@
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 = {
- dict: PropTypes.object, // 瀛楀吀椤�
+ name: PropTypes.string, // 缁勪欢鍚嶇О
inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢
}
@@ -52,30 +53,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: '',
- 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: '璇疯緭鍏ョ粍浠跺悕绉�!'
+ },
+ {
+ max: 15,
+ message: '缁勪欢鍚嶇О鏈�澶�15涓瓧绗�!'
+ }
+ ]
+ })(<Input placeholder={''} autoComplete="off" onPressEnter={this.handleSubmit}/>)}
+ </Form.Item>
+ </Col>
+ </Row>
+ </Form>
)
}
}
--
Gitblit v1.8.0