From 8d66ff34fae5b048a6b7923cc75d34f13a08be9d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 02 八月 2022 11:42:43 +0800
Subject: [PATCH] Merge branch 'develop'

---
 src/views/design/sidemenu/menuform/index.jsx |   24 ++++++++----------------
 1 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/src/templates/menuconfig/menuform/index.jsx b/src/views/design/sidemenu/menuform/index.jsx
similarity index 84%
rename from src/templates/menuconfig/menuform/index.jsx
rename to src/views/design/sidemenu/menuform/index.jsx
index 8a1ae15..fa06332 100644
--- a/src/templates/menuconfig/menuform/index.jsx
+++ b/src/views/design/sidemenu/menuform/index.jsx
@@ -3,13 +3,12 @@
 import { Form, Row, Col, Input, Select } from 'antd'
 
 import asyncComponent from '@/utils/asyncComponent'
-import './index.scss'
+// import './index.scss'
 
 const MkEditIcon = asyncComponent(() => import('@/components/mkIcon'))
 
-class MainSearch extends Component {
+class MainForm extends Component {
   static propTpyes = {
-    dict: PropTypes.object,     // 瀛楀吀椤�
     formlist: PropTypes.array,
     inputSubmit: PropTypes.func
   }
@@ -48,10 +47,10 @@
                 rules: [
                   {
                     required: !!item.required,
-                    message: this.props.dict['form.required.input'] + item.label + '!'
+                    message: '璇疯緭鍏�' + item.label + '!'
                   }
                 ]
-              })(<Input placeholder="" autoFocus={item.key.toLowerCase() === 'menuname'} autoComplete="off" disabled={item.readonly} />)}
+              })(<Input placeholder="" autoFocus={item.key.toLowerCase() === 'menuname'} autoComplete="off" disabled={item.readonly} onPressEnter={() => this.props.inputSubmit()}/>)}
             </Form.Item>
           </Col>
         )
@@ -64,7 +63,7 @@
                 rules: [
                   {
                     required: !!item.required,
-                    message: this.props.dict['form.required.select'] + item.label + '!'
+                    message: '璇烽�夋嫨' + item.label + '!'
                   }
                 ]
               })(
@@ -93,7 +92,7 @@
                 rules: [
                   {
                     required: !!item.required,
-                    message: this.props.dict['form.required.select'] + item.label + '!'
+                    message: '璇烽�夋嫨' + item.label + '!'
                   }
                 ]
               })(
@@ -120,13 +119,6 @@
     })
   }
 
-  onEnterSubmit = (e) => {
-    // 琛ㄥ崟鍥炶溅鎻愪氦
-    if (e.key !== 'Enter') return
-    
-    this.props.inputSubmit && this.props.inputSubmit()
-  }
-
   render() {
     const formItemLayout = {
       labelCol: {
@@ -139,11 +131,11 @@
       }
     }
     return (
-      <Form {...formItemLayout} className="ant-advanced-search-form" id="form-box" onKeyDown={this.onEnterSubmit}>
+      <Form {...formItemLayout} id="form-box">
         <Row gutter={24}>{this.getFields()}</Row>
       </Form>
     )
   }
 }
 
-export default Form.create()(MainSearch)
\ No newline at end of file
+export default Form.create()(MainForm)
\ No newline at end of file

--
Gitblit v1.8.0