From 992f25d08ea2b5a6438ccc792a5c723b8a72f674 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 06 八月 2021 18:19:39 +0800
Subject: [PATCH] 2021-08-06

---
 src/menu/components/card/cardcellcomponent/elementform/index.jsx |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/src/menu/components/card/cardcellcomponent/elementform/index.jsx b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
index c116d50..84ae886 100644
--- a/src/menu/components/card/cardcellcomponent/elementform/index.jsx
+++ b/src/menu/components/card/cardcellcomponent/elementform/index.jsx
@@ -10,12 +10,13 @@
 const { TextArea } = Input
 const ColorSketch = asyncComponent(() => import('@/mob/colorsketch'))
 const SourceComponent = asyncComponent(() => import('@/menu/components/share/sourcecomponent'))
+const MkIcon = asyncComponent(() => import('@/components/mkIcon'))
 
 const cardTypeOptions = {
   sequence: ['eleType', 'width'],
   text: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix', 'link'],
   number: ['eleType', 'datatype', 'format', 'width', 'height', 'prefix', 'postfix'],
-  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'link'],
+  picture: ['eleType', 'datatype', 'width', 'lenWidRadio', 'maxWidth', 'link', 'scale'],
   video: ['eleType', 'datatype', 'width', 'aspectRatio', 'autoPlay', 'loop'],
   icon: ['eleType', 'icon', 'datatype', 'width'],
   slider: ['eleType', 'datatype', 'width', 'color', 'maxValue'],
@@ -23,6 +24,7 @@
   barcode: ['eleType', 'datatype', 'width', 'barHeight', 'displayValue', 'interval'],
   qrcode: ['eleType', 'datatype', 'width', 'qrWidth', 'color', 'url'],
   currentDate: ['eleType', 'width', 'dateFormat', 'prefix', 'postfix'],
+  formula: ['eleType', 'width', 'height', 'prefix', 'postfix', 'formula'],
 }
 
 class MainSearch extends Component {
@@ -104,9 +106,9 @@
         if (link === 'dynamic' || link === 'static' || link === 'custom') {
           _options.push('linkurl', 'joint')
         } else if (link === 'page') {
-          _options.push('copyMenuId', 'joint')
+          _options.push('copyMenuId', 'joint', 'open')
         } else if (link === 'linkpage') {
-          _options.push('linkmenu', 'joint')
+          _options.push('linkmenu', 'joint', 'open')
         }
       }
     } else if (eleType === 'icon') {
@@ -298,7 +300,7 @@
                     message: formRule.input.message
                   }
                 ]
-              })(<TextArea rows={2} disabled={item.readonly} />)}
+              })(<TextArea rows={2} disabled={item.readonly} placeholder={item.placeholder || ''} />)}
             </Form.Item>
           </Col>
         )
@@ -353,6 +355,27 @@
             </Form.Item>
           </Col>
         )
+      } else if (item.type === 'icon') {
+        fields.push(
+          <Col span={12} key={index}>
+            <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.select'] + item.label + '!'
+                }]
+              })(
+                <MkIcon />
+              )}
+            </Form.Item>
+          </Col>
+        )
       } else if (item.type === 'radio') {
         fields.push(
           <Col span={12} key={index}>

--
Gitblit v1.8.0