From ddddb07002201150da9551875c25e75499563249 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 15 一月 2021 15:22:55 +0800
Subject: [PATCH] 2021-01-15

---
 src/menu/components/card/prop-card/index.jsx |   20 +++++++-------------
 1 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/menu/components/card/prop-card/index.jsx b/src/menu/components/card/prop-card/index.jsx
index 9b0e60f..9032026 100644
--- a/src/menu/components/card/prop-card/index.jsx
+++ b/src/menu/components/card/prop-card/index.jsx
@@ -51,11 +51,11 @@
         pageable: false,    // 缁勪欢灞炴�� - 鏄惁鍙垎椤�
         switchable: true,  // 缁勪欢灞炴�� - 鏁版嵁鏄惁鍙垏鎹�
         dataName: card.dataName || '',
-        width: 24,
+        width: card.width || 24,
         name: card.name,
         subtype: card.subtype,
         setting: { interType: 'system' },
-        wrap: { name: card.name, width: 24, title: '', addable: 'false', switch: 'false', datatype: 'static' },
+        wrap: { name: card.name, width: card.width || 24, title: '', addable: 'false', switch: 'false', datatype: 'static' },
         style: { marginLeft: '0px', marginRight: '0px', marginTop: '8px', marginBottom: '8px' },
         headerStyle: { fontSize: '16px', borderBottomWidth: '1px', borderBottomColor: '#e8e8e8' },
         columns: [],
@@ -78,8 +78,8 @@
       if (card.config) {
         let config = fromJS(card.config).toJS()
 
-        _card.setting = config.setting
         _card.wrap = config.wrap
+        _card.wrap.name = card.name
         _card.style = config.style
         _card.headerStyle = config.headerStyle
 
@@ -94,14 +94,6 @@
             return elem
           })
           return scard
-        })
-        _card.columns = config.columns.map(col => {
-          col.uuid = Utils.getuuid()
-          return col
-        })
-        _card.scripts = config.scripts.map(col => {
-          col.uuid = Utils.getuuid()
-          return col
         })
       }
       this.setState({
@@ -309,8 +301,10 @@
 
       card.btnlog = logs
 
-      this.setState({ card })
-      this.props.updateConfig(card)
+      this.setState({ card: {...card, subcards: []} }, () => {
+        this.setState({ card })
+        this.props.updateConfig(card)
+      })
       if (!done) {
         notification.warning({
           top: 92,

--
Gitblit v1.8.0