From c51f5e007a3e03c9d6731ab7f28f0080de009990 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 17 十一月 2021 18:38:32 +0800
Subject: [PATCH] 2021-11-17

---
 src/tabviews/zshare/actionList/popupbutton/index.jsx |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/tabviews/zshare/actionList/popupbutton/index.jsx b/src/tabviews/zshare/actionList/popupbutton/index.jsx
index 0705de6..4c1fe85 100644
--- a/src/tabviews/zshare/actionList/popupbutton/index.jsx
+++ b/src/tabviews/zshare/actionList/popupbutton/index.jsx
@@ -31,6 +31,7 @@
     popData: null,
     primaryId: '',
     disabled: false,
+    hidden: false,
     loading: false,
   }
 
@@ -45,7 +46,7 @@
           disabled = true
         }
       })
-      this.setState({disabled})
+      this.setState({disabled, hidden: disabled && btn.control === 'hidden'})
     }
   }
 
@@ -74,7 +75,7 @@
           }
         })
       }
-      this.setState({disabled})
+      this.setState({disabled, hidden: disabled && btn.control === 'hidden'})
     }
   }
 
@@ -279,7 +280,9 @@
 
   render() {
     const { btn, show } = this.props
-    const { loading, disabled } = this.state
+    const { loading, disabled, hidden } = this.state
+
+    if (hidden) return null
 
     let label = ''
     let icon = ''

--
Gitblit v1.8.0