From 063b983daaf51a7f1e8677bde1e9c0e618866c91 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 21 二月 2020 10:30:19 +0800
Subject: [PATCH] 2020-02-21

---
 src/templates/ushare/modalform/index.jsx |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/templates/ushare/modalform/index.jsx b/src/templates/ushare/modalform/index.jsx
index 3b27a2d..063fa5c 100644
--- a/src/templates/ushare/modalform/index.jsx
+++ b/src/templates/ushare/modalform/index.jsx
@@ -57,8 +57,10 @@
       _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
     } else if (type === 'fileupload') {
       _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
-    } else if (type === 'text' || type === 'textarea') {
+    } else if (type === 'textarea') {
       _options = [..._options, 'fieldlength']
+    } else if (type === 'text') {
+      _options = [..._options, 'fieldlength', 'regular']
     }
 
     if (type === 'select') {
@@ -117,8 +119,10 @@
         _options = ['label', 'field', 'initval', 'type', 'readonly', 'hidden', 'decimal', 'min', 'max', 'readin']
       } else if (value === 'fileupload') {
         _options = ['label', 'field', 'type', 'readonly', 'required', 'readin', 'fieldlength']
-      } else if (value === 'text' || value === 'textarea') {
+      } else if (value === 'textarea') {
         _options = [..._options, 'fieldlength']
+      } else if (value === 'text') {
+        _options = [..._options, 'fieldlength', 'regular']
       }
 
       if (value === 'select') {
@@ -257,7 +261,12 @@
         }
         fields.push(
           <Col span={12} key={index}>
-            <Form.Item label={item.label}>
+            <Form.Item label={item.tooltip ?
+              <Tooltip placement="topLeft" title={item.tooltip}>
+                <Icon type="question-circle" />
+                {item.label}
+              </Tooltip> : item.label
+            }>
               {getFieldDecorator(item.key, {
                 initialValue: item.initVal || '',
                 rules: [

--
Gitblit v1.8.0