From b69b5f6329ca5f87932436b7a6c1ddfc3377e10f Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 16 五月 2024 10:56:41 +0800
Subject: [PATCH] 2024-05-16

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

diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index e42ca31..efa162d 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -66,11 +66,27 @@
 
         window.GLOB.SyncData.delete(_config.dataName)
       }
+    } else {
+      _config.subcards.forEach(card => {
+        card.elements.forEach(ele => {
+          if (ele.eleType === 'button') return
+          if (ele.datatype === 'dynamic' && ele.field) {
+            ele.field = ele.field.toLowerCase()
+          }
+        })
+      })
     }
 
     _data.$$uuid = _data[_config.setting.primaryKey] || ''
     _data.$$BID = BID || ''
     _data.$$BData = BData || ''
+
+    if (_config.wrap.datatype === 'static' && BData) {
+      Object.keys(BData).forEach(key => {
+        if (/\$/.test(key)) return
+        _data[key.toLowerCase()] = BData[key]
+      })
+    }
 
     if (!_config.wrap.height) { // 鍏煎
       _config.wrap.height = _config.style.height || '300px'
@@ -319,8 +335,16 @@
     const { config, BID, BData } = this.state
 
     if (config.wrap.datatype === 'static') {
+      let _data = {$$BID: BID || '', $$BData: BData, $$empty: true}
+      if (BData) {
+        Object.keys(BData).forEach(key => {
+          if (/\$/.test(key)) return
+          _data[key.toLowerCase()] = BData[key]
+        })
+      }
+
       this.setState({
-        data: {$$BID: BID || '', $$BData: BData, $$empty: true}
+        data: _data
       })
       return
     } else if (config.setting.supModule && !BID) { // BID 涓嶅瓨鍦ㄦ椂锛屼笉鍋氭煡璇�

--
Gitblit v1.8.0