From fe21d23b147ed5cec22b4f76a88840b05495d4ad Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 18 六月 2022 22:33:59 +0800
Subject: [PATCH] 2022-06-18

---
 src/menu/components/share/usercomponent/settingform/index.jsx |   56 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 30 insertions(+), 26 deletions(-)

diff --git a/src/menu/components/share/usercomponent/settingform/index.jsx b/src/menu/components/share/usercomponent/settingform/index.jsx
index 7c45ae5..d918739 100644
--- a/src/menu/components/share/usercomponent/settingform/index.jsx
+++ b/src/menu/components/share/usercomponent/settingform/index.jsx
@@ -1,12 +1,14 @@
 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 +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: '',
-                  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