From e603c97dbe7a4f1dbd6445e00383ed651182e0fe Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 03 三月 2020 17:09:11 +0800
Subject: [PATCH] 2020-03-03

---
 src/templates/ushare/modalform/index.jsx |   26 +++++++++++++++++++++-----
 1 files changed, 21 insertions(+), 5 deletions(-)

diff --git a/src/templates/ushare/modalform/index.jsx b/src/templates/ushare/modalform/index.jsx
index 9771c0b..2e94ac3 100644
--- a/src/templates/ushare/modalform/index.jsx
+++ b/src/templates/ushare/modalform/index.jsx
@@ -61,7 +61,7 @@
     } else if (type === 'fileupload') {
       _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
     } else if (type === 'textarea') {
-      _options = [..._options, 'fieldlength']
+      _options = [..._options, 'fieldlength', 'maxRows']
     } else if (type === 'text') {
       _options = [..._options, 'fieldlength', 'regular']
     }
@@ -132,7 +132,7 @@
       } else if (value === 'fileupload') {
         _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
       } else if (value === 'textarea') {
-        _options = [..._options, 'fieldlength']
+        _options = [..._options, 'fieldlength', 'maxRows']
       } else if (value === 'text') {
         _options = [..._options, 'fieldlength', 'regular']
       }
@@ -325,7 +325,7 @@
                       message: this.props.dict['form.required.input'] + item.label + '!'
                     }
                   ]
-                })(<InputNumber min={0} max={18} precision={0} onPressEnter={this.handleSubmit} />)}
+                })(<InputNumber min={0} max={18} precision={0} />)}
               </Form.Item>
             </Col>
           )
@@ -341,7 +341,23 @@
                       message: this.props.dict['form.required.input'] + item.label + '!'
                     }
                   ]
-                })(<InputNumber min={1} precision={0} onPressEnter={this.handleSubmit} />)}
+                })(<InputNumber min={1} precision={0} />)}
+              </Form.Item>
+            </Col>
+          )
+        } else if (item.key === 'maxRows') {
+          fields.push(
+            <Col span={12} key={index}>
+              <Form.Item label={item.label}>
+                {getFieldDecorator(item.key, {
+                  initialValue: item.initVal,
+                  rules: [
+                    {
+                      required: !!item.required,
+                      message: this.props.dict['form.required.input'] + item.label + '!'
+                    }
+                  ]
+                })(<InputNumber min={2} max={100} precision={0} />)}
               </Form.Item>
             </Col>
           )
@@ -357,7 +373,7 @@
                       message: this.props.dict['form.required.input'] + item.label + '!'
                     }
                   ]
-                })(<InputNumber onPressEnter={this.handleSubmit} />)}
+                })(<InputNumber />)}
               </Form.Item>
             </Col>
           )

--
Gitblit v1.8.0