From 0f22c04237fbe746887feafafca36d5cf996d0e0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期日, 26 九月 2021 18:28:26 +0800
Subject: [PATCH] 2021-09-26

---
 src/tabviews/custom/components/card/table-card/index.jsx |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/custom/components/card/table-card/index.jsx b/src/tabviews/custom/components/card/table-card/index.jsx
index 60cb283..fc4ef0b 100644
--- a/src/tabviews/custom/components/card/table-card/index.jsx
+++ b/src/tabviews/custom/components/card/table-card/index.jsx
@@ -32,7 +32,7 @@
     total: 0,                  // 鎬绘暟
     sync: false,               // 鏄惁缁熶竴璇锋眰鏁版嵁
     data: null,                // 鏁版嵁
-    BData: null
+    BData: ''
   }
 
   /**
@@ -40,7 +40,7 @@
    * 1銆� initdata 涓烘墦鍗版椂浣跨敤鐨勬暟鎹泦
    */
   UNSAFE_componentWillMount () {
-    const { data, initdata, BID } = this.props
+    const { data, initdata, BID, BData } = this.props
     let _config = fromJS(this.props.config).toJS()
     let _cols = new Map()
 
@@ -92,6 +92,7 @@
     this.setState({
       sync: _sync,
       BID: BID || '',
+      BData: BData || '',
       data: _data,
       config: _config,
       search: Utils.initMainSearch(_config.search),
@@ -128,7 +129,7 @@
    * @description 鍥捐〃鏁版嵁鏇存柊锛屽埛鏂板唴瀹�
    */
   UNSAFE_componentWillReceiveProps (nextProps) {
-    const { sync, config, BID } = this.state
+    const { sync, config, BID, BData } = this.state
 
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
       let _data = []
@@ -140,6 +141,7 @@
         item.key = index
         item.$$uuid = item[config.setting.primaryKey] || ''
         item.$$BID = BID || ''
+        item.$$BData = BData || ''
         item.$Index = index + 1 + ''
         return item
       })

--
Gitblit v1.8.0