From 26d0fa42ea8c63a87e8ef93d0915f75f46fb1f9c Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 三月 2022 11:09:53 +0800
Subject: [PATCH] 2022-03-24

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

diff --git a/src/tabviews/custom/components/carousel/prop-card/index.jsx b/src/tabviews/custom/components/carousel/prop-card/index.jsx
index af669f7..22a2df9 100644
--- a/src/tabviews/custom/components/carousel/prop-card/index.jsx
+++ b/src/tabviews/custom/components/carousel/prop-card/index.jsx
@@ -41,15 +41,15 @@
       _sync = _config.setting.sync === 'true'
 
       if (_sync && data) {
-        _data = data[_config.dataName] || {}
+        _data = data[_config.dataName] || {$$empty: true}
         if (Array.isArray(_data)) {
-          _data = _data[0] || {}
+          _data = _data[0] || {$$empty: true}
         }
         _sync = false
       } else if (_sync && initdata) {
-        _data = initdata || {}
+        _data = initdata
         if (Array.isArray(_data)) {
-          _data = _data[0] || {}
+          _data = _data[0] || {$$empty: true}
         }
         _sync = false
       }
@@ -122,9 +122,9 @@
     if (sync && !is(fromJS(this.props.data), fromJS(nextProps.data))) {
       let _data = {$$empty: true}
       if (nextProps.data && nextProps.data[config.dataName]) {
-        _data = nextProps.data[config.dataName] || {}
+        _data = nextProps.data[config.dataName]
         if (Array.isArray(_data)) {
-          _data = _data[0] || {}
+          _data = _data[0] || {$$empty: true}
         }
       }
 
@@ -245,6 +245,8 @@
   render() {
     const { config, loading, data } = this.state
 
+    if (config.wrap.empty === 'hidden' && (!data || data.$$empty)) return null
+
     return (
       <div className="custom-prop-carousel-box" style={config.style}>
         {loading ?

--
Gitblit v1.8.0