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/table/normal-table/index.jsx |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/src/tabviews/custom/components/table/normal-table/index.jsx b/src/tabviews/custom/components/table/normal-table/index.jsx
index 6fdb93b..9adf4bf 100644
--- a/src/tabviews/custom/components/table/normal-table/index.jsx
+++ b/src/tabviews/custom/components/table/normal-table/index.jsx
@@ -56,7 +56,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()
     let _data = null
@@ -80,6 +80,7 @@
         item.key = index
         item.$$uuid = item[_config.setting.primaryKey] || ''
         item.$$BID = BID || ''
+        item.$$BData = BData || ''
         item.$Index = index + 1 + ''
         return item
       })
@@ -124,6 +125,7 @@
 
     this.setState({
       BID: BID || '',
+      BData: BData || '',
       title: _config.wrap.title,
       sync: _sync,
       data: _data,
@@ -521,7 +523,7 @@
   }
 
   UNSAFE_componentWillReceiveProps(nextProps) {
-    const { sync, config, setting, BID } = this.state
+    const { sync, config, setting, BID, BData } = this.state
 
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
       let _data = []
@@ -531,6 +533,7 @@
           item.key = index
           item.$$uuid = item[config.setting.primaryKey] || ''
           item.$$BID = BID || ''
+          item.$$BData = BData || ''
           item.$Index = index + 1 + ''
           return item
         })
@@ -578,7 +581,7 @@
   }
 
   render() {
-    const { BID, setting, searchlist, actions, config, columns, selectedData } = this.state
+    const { BID, setting, searchlist, actions, config, columns, selectedData, BData } = this.state
 
     return (
       <div className="custom-normal-table" style={config.style}>
@@ -591,7 +594,7 @@
               BID={BID}
               setting={setting}
               actions={actions}
-              BData={this.state.BData}
+              BData={BData}
               columns={config.columns}
               selectedData={selectedData}
             />
@@ -620,7 +623,7 @@
             BID={BID}
             setting={setting}
             actions={actions}
-            BData={this.state.BData}
+            BData={BData}
             columns={config.columns}
             selectedData={selectedData}
           />

--
Gitblit v1.8.0