From 6afdec0062dacbded57e166230eb22cc55ced0c1 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期六, 08 五月 2021 14:30:21 +0800
Subject: [PATCH] 2021-05-08

---
 src/templates/sharecomponent/columncomponent/columnform/index.jsx |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/templates/sharecomponent/columncomponent/columnform/index.jsx b/src/templates/sharecomponent/columncomponent/columnform/index.jsx
index dc17190..5932983 100644
--- a/src/templates/sharecomponent/columncomponent/columnform/index.jsx
+++ b/src/templates/sharecomponent/columncomponent/columnform/index.jsx
@@ -5,12 +5,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', 'fieldlength', 'blacklist', 'perspective', 'rowspan'],
   number: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'decimal', 'format', 'prefix', 'postfix', 'blacklist', 'perspective', 'sum', 'rowspan'],
   link: ['label', 'field', 'type', 'nameField', 'Align', 'Hide', 'IsSort', 'joint', 'Width', 'fieldlength', 'blacklist'],
   textarea: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'prefix', 'postfix', 'fieldlength', 'blacklist'],
-  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight']
+  picture: ['label', 'field', 'type', 'Align', 'Hide', 'IsSort', 'Width', 'fieldlength', 'blacklist', 'scale', 'maxHeight'],
+  index: ['label', 'type', 'Align', 'Width']
 }
 
 class MainSearch extends Component {
@@ -37,7 +39,7 @@
       if (card.perspective === 'linkmenu') {
         _options.push('linkmenu', 'linkfields')
       } else if (card.perspective === 'linkurl') {
-        _options.push('linkurl')
+        _options.push('linkurl', 'linkfields')
       }
     }
 
@@ -77,7 +79,7 @@
         if (card.perspective === 'linkmenu') {
           _options.push('linkmenu', 'linkfields')
         } else if (card.perspective === 'linkurl') {
-          _options.push('linkurl')
+          _options.push('linkurl', 'linkfields')
         }
       }
 
@@ -110,7 +112,7 @@
       if (value === 'linkmenu') {
         _options.push('linkmenu', 'linkfields')
       } else if (value === 'linkurl') {
-        _options.push('linkurl')
+        _options.push('linkurl', 'linkfields')
       }
 
       this.setState({
@@ -175,6 +177,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} onPressEnter={this.handleSubmit} />)}
+            </Form.Item>
+          </Col>
+        )
       } else if (item.type === 'number') {
         fields.push(
           <Col span={12} key={index}>

--
Gitblit v1.8.0