From deab3ddf1990cd25b4692d1358ac9d50856644f0 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 24 三月 2023 14:28:31 +0800
Subject: [PATCH] 2023-03-24

---
 src/tabviews/custom/components/carousel/data-card/index.jsx |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/src/tabviews/custom/components/carousel/data-card/index.jsx b/src/tabviews/custom/components/carousel/data-card/index.jsx
index 4dbe6e2..590bc98 100644
--- a/src/tabviews/custom/components/carousel/data-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/data-card/index.jsx
@@ -294,19 +294,28 @@
         Api.writeCacheConfig(config.uuid, result.data || '')
       }
 
+      let data = result.data.map((item, index) => {
+        item.key = index
+        item.$$uuid = item[config.setting.primaryKey] || ''
+        item.$$BID = BID || ''
+        item.$$BData = BData || ''
+        item.$Index = index + 1
+        return item
+      })
+
       this.setState({
-        data: result.data.map((item, index) => {
-          item.key = index
-          item.$$uuid = item[config.setting.primaryKey] || ''
-          item.$$BID = BID || ''
-          item.$$BData = BData || ''
-          item.$Index = index + 1
-          return item
-        }),
+        data: data,
         loading: false
       }, () => {
         this.openModal(result.ErrCode)
       })
+
+      if (config.timer && config.clearField && result.data && result.data[0]) {
+        let vals = (config.clearValue || '').split(',')
+        if (vals.includes(result.data[0][config.clearField])) {
+          this.timer && this.timer.stop()
+        }
+      }
     } else {
       this.setState({
         loading: false

--
Gitblit v1.8.0