From fa381753ef2a2b25b1c0722549ac17e333da79be Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 06 九月 2022 22:50:54 +0800
Subject: [PATCH] 2022-09-06

---
 src/components/normalform/modalform/index.jsx |   42 +++++++++++++++++++++++++++++++-----------
 1 files changed, 31 insertions(+), 11 deletions(-)

diff --git a/src/components/normalform/modalform/index.jsx b/src/components/normalform/modalform/index.jsx
index 6586950..ce8b71d 100644
--- a/src/components/normalform/modalform/index.jsx
+++ b/src/components/normalform/modalform/index.jsx
@@ -263,21 +263,41 @@
       } else if (item.type === 'source') {
         content = (<SourceComponent type="" placement="right"/>)
       } else if (item.type === 'table') {
-        content = (<MKTable columns={item.columns || []} actions={item.actions || []}/>)
+        content = (<MKTable tip={item.tip || ''} columns={item.columns || []} actions={item.actions || []}/>)
+      } else if (item.type === 'hint') {
+        fields.push(
+          <Col span={24} key={index}>
+            <div style={{color: '#1890ff', borderBottom: '1px solid #e9e9e9', marginBottom: '15px', paddingLeft: '10px'}}>{item.label}</div>
+          </Col>
+        )
+        return
       }
 
       if (!content) return
 
-      fields.push(
-        <Col span={item.span || 12} key={index}>
-          <Form.Item label={label}>
-            {getFieldDecorator(item.field, {
-              initialValue: item.initval,
-              rules: item.rules
-            })(content)}
-          </Form.Item>
-        </Col>
-      )
+      if (item.help) {
+        fields.push(
+          <Col span={item.span || 12} key={index}>
+            <Form.Item label={label} help={<span style={{fontSize: '12px'}}>{item.help}</span>}>
+              {getFieldDecorator(item.field, {
+                initialValue: item.initval,
+                rules: item.rules
+              })(content)}
+            </Form.Item>
+          </Col>
+        )
+      } else {
+        fields.push(
+          <Col span={item.span || 12} key={index}>
+            <Form.Item label={label}>
+              {getFieldDecorator(item.field, {
+                initialValue: item.initval,
+                rules: item.rules
+              })(content)}
+            </Form.Item>
+          </Col>
+        )
+      }
     })
     
     return fields

--
Gitblit v1.8.0