From 5a995a24857abb0a1dac5e4c67c600e54db01539 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 13 十月 2021 17:35:56 +0800
Subject: [PATCH] 2021-10-13

---
 src/menu/components/table/edit-table/columns/editColumn/index.jsx |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/src/menu/components/table/edit-table/columns/editColumn/index.jsx b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
index df36da4..18f871c 100644
--- a/src/menu/components/table/edit-table/columns/editColumn/index.jsx
+++ b/src/menu/components/table/edit-table/columns/editColumn/index.jsx
@@ -7,12 +7,14 @@
 import { formRule } from '@/utils/option.js'
 import './index.scss'
 
+const { TextArea } = Input
 const columnTypeOptions = {
   text: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'textFormat', 'editable', 'initval', 'blacklist'],
   number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'editable', 'initval', 'sum', 'blacklist'],
   textarea: ['label', 'field', 'type', 'Align', 'Hide', 'Width', 'prefix', 'initval', 'postfix', 'blacklist'],
   custom: ['label', 'type', 'Align', 'Hide', 'Width', 'blacklist'],
   action: ['label', 'type', 'Align', 'Width'],
+  formula: ['label', 'type', 'Align', 'Hide', 'Width', 'prefix', 'postfix', 'eval', 'formula', 'blacklist'],
   index: ['label', 'type', 'Align', 'Width']
 }
 
@@ -304,6 +306,27 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'textarea') { // 鏂囨湰鎼滅储
+        fields.push(
+          <Col span={24} key={index} className="textarea">
+            <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: [
+                  {
+                    required: !!item.required,
+                    message: this.props.dict['form.required.input'] + item.label + '!'
+                  }
+                ]
+              })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''} />)}
+            </Form.Item>
+          </Col>
+        )
       }
     })
     return fields

--
Gitblit v1.8.0