From 31ec63f0419895876cbaba99637a884a32d33d0d Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 01 九月 2021 10:31:45 +0800
Subject: [PATCH] 2021-09-01

---
 src/templates/zshare/pasteform/index.jsx |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/src/templates/zshare/pasteform/index.jsx b/src/templates/zshare/pasteform/index.jsx
index 7cdfc58..b6c1af9 100644
--- a/src/templates/zshare/pasteform/index.jsx
+++ b/src/templates/zshare/pasteform/index.jsx
@@ -7,7 +7,18 @@
 
 class MainSearch extends Component {
   static propTpyes = {
-    dict: PropTypes.object     // 瀛楀吀椤�
+    inputSubmit: PropTypes.func // 鍥炶溅浜嬩欢
+  }
+
+  componentDidMount () {
+    try {
+      let _form = document.getElementById('config')
+      if (_form && _form.select) {
+        _form.select()
+      }
+    } catch (e) {
+      console.warn('Form focusing error锛�')
+    }
   }
 
   handleConfirm = () => {
@@ -23,7 +34,7 @@
             notification.warning({
               top: 92,
               message: '瑙f瀽閿欒',
-              duration: 10
+              duration: 5
             })
             _config = ''
           }
@@ -60,10 +71,10 @@
                 rules: [
                   {
                     required: true,
-                    message: this.props.dict['form.required.input'] + '閰嶇疆淇℃伅!'
+                    message: '璇疯緭鍏ラ厤缃俊鎭�!'
                   }
                 ]
-              })(<TextArea autosize={{ minRows: 4, maxRows: 8 }} />)}
+              })(<TextArea autoSize={{ minRows: 6, maxRows: 6 }} onPressEnter={() => this.props.inputSubmit && this.props.inputSubmit()}/>)}
             </Form.Item>
           </Col>
         </Row>

--
Gitblit v1.8.0