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

---
 src/tabviews/zshare/actionList/asyncButtonComponent.jsx |   25 +++++++++++--------------
 1 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
index 1d48bf6..008bedb 100644
--- a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
+++ b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
@@ -21,25 +21,22 @@
       this.setState({component})
     }
 
-    // <Button className="loading-skeleton" disabled={true}></Button> // 楠ㄦ灦鎸夐挳
+    componentWillUnmount () {
+      this.setState = () => {
+        return
+      }
+    }
+
     render() {
       const C = this.state.component
       const btn = this.props.btn || {}
       let style = {}
 
-      if (!C && btn.btnstyle) {
-        if (btn.btnstyle.marginRight) {
-          style.marginRight = btn.btnstyle.marginRight
-        }
-        if (btn.btnstyle.marginLeft) {
-          style.marginLeft = btn.btnstyle.marginLeft
-        }
-        if (btn.btnstyle.marginTop) {
-          style.marginTop = btn.btnstyle.marginTop
-        }
-        if (btn.btnstyle.marginBottom) {
-          style.marginBottom = btn.btnstyle.marginBottom
-        }
+      if (!C && btn.style) {
+        style.marginRight = btn.style.marginRight || ''
+        style.marginLeft = btn.style.marginLeft || ''
+        style.marginTop = btn.style.marginTop || ''
+        style.marginBottom = btn.style.marginBottom || ''
       }
 
       return C ?

--
Gitblit v1.8.0