From 6c16e43cd6521460c804391c042348dbb14086fc Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 16 六月 2020 09:44:40 +0800
Subject: [PATCH] 2020-06-16

---
 src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
index a1f35d5..e181185 100644
--- a/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
+++ b/src/templates/sharecomponent/chartgroupcomponent/chartform/index.jsx
@@ -204,6 +204,8 @@
           item.hidden = false
         } else if (item.key === 'switch' && _type === 'card') {
           item.hidden = false
+        } else if (item.key === 'insert') {
+          item.hidden = _type !== 'card'
         } else if (item.key === 'bgfield') {
           item.hidden = _type !== 'card'
         }
@@ -256,6 +258,8 @@
             item.hidden = false
           } else if (item.key === 'switch' && value === 'card') {
             item.hidden = false
+          } else if (item.key === 'insert') {
+            item.hidden = value !== 'card'
           } else if (item.key === 'bgfield') {
             item.hidden = value !== 'card'
           }
@@ -322,6 +326,7 @@
   getFields() {
     const { getFieldDecorator } = this.props.form
     const fields = []
+
     this.state.formlist.forEach((item, index) => {
       if (item.hidden) return
       
@@ -487,10 +492,15 @@
               result.subelement = selectlegend.subelement
             }
 
+            if (result.widthType === 'ratio' && result.avatar && result.avatar.widthType !== 'ratio') {
+              result.avatar.widthType = 'ratio'
+              result.avatar.width = 32
+            }
+
             if (!result.details) {
               result.details = [
-                {elemType: 'detail', bold: 'true', uuid: 'cardtitle', content: 'Card title', datatype: 'static', align: 'left'},
-                {elemType: 'detail',bold: 'false', uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'}
+                {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'cardtitle', content: 'Card content', datatype: 'static', align: 'left'},
+                {elemType: 'detail', fontWeight: 'normal', fontSize: 14, width: 100, height: 1, uuid: 'carddescription', content: 'Card content', datatype: 'static', align: 'left'}
               ]
               result.bottom = {
                 elemType: 'bottom',
@@ -510,8 +520,10 @@
                 type: 'picture',
                 field: '',
                 size: 14,
-                widthType: 'absolute',
-                width: 32
+                widthType: 'ratio',
+                width: 32,
+                avatarWidth: 32,
+                radius: 'true'
               }
             }
 

--
Gitblit v1.8.0