From a8507cc8c42d17d4fb854594dbf1e084d61912ac Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期二, 18 十月 2022 12:44:22 +0800
Subject: [PATCH] 2022-10-18

---
 src/tabviews/custom/components/card/prop-card/index.jsx |   33 +++++++++++++++++++++++++++------
 1 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/src/tabviews/custom/components/card/prop-card/index.jsx b/src/tabviews/custom/components/card/prop-card/index.jsx
index 4f4c46c..69708a2 100644
--- a/src/tabviews/custom/components/card/prop-card/index.jsx
+++ b/src/tabviews/custom/components/card/prop-card/index.jsx
@@ -140,6 +140,12 @@
           this.checkTopLine()
         }, 200)
       }
+
+      if (!_config.wrap.cardType && _data.$$uuid) {
+        setTimeout(() => {
+          this.transferLine()
+        }, 200)
+      }
     })
   }
 
@@ -199,9 +205,9 @@
 
       this.setState({sync: false, data: _data}, () => {
         if (selected !== 'false') {
-          setTimeout(() => {
-            this.checkTopLine()
-          }, 200)
+          this.checkTopLine()
+        } else if (!config.wrap.cardType && _data.$$uuid) {
+          this.transferLine()
         }
       })
     } else if (config.setting.syncRefresh && nextProps.mainSearch && !is(fromJS(this.props.mainSearch), fromJS(nextProps.mainSearch))) {
@@ -223,9 +229,9 @@
 
       this.setState({data: _data}, () => {
         if (selected !== 'false') {
-          setTimeout(() => {
-            this.checkTopLine()
-          }, 200)
+          this.checkTopLine()
+        } else {
+          this.transferLine()
         }
       })
     }
@@ -247,6 +253,14 @@
     }
 
     MKEmitter.emit('resetSelectLine', config.uuid, primaryId, data)
+  }
+
+  transferLine = () => {
+    const { config, data } = this.state
+
+    if (config.wrap.cardType) return
+
+    MKEmitter.emit('resetSelectLine', config.uuid, data.$$uuid || '', data)
   }
 
   /**
@@ -314,6 +328,11 @@
     const { mainSearch } = this.props
     const { config, arr_field, BID, BData, selected } = this.state
 
+    if (config.wrap.datatype === 'public') {
+      MKEmitter.emit('reloadData', config.wrap.publicId)
+      return
+    }
+    
     if (config.wrap.datatype === 'static') {
       this.setState({
         data: {$$BID: BID || '', $$BData: BData, $$empty: true},
@@ -362,6 +381,8 @@
       }, () => {
         if (selected !== 'false') {
           this.checkTopLine()
+        } else {
+          this.transferLine()
         }
       })
 

--
Gitblit v1.8.0