From 0227c25e4ed573d3095ada3f9c9a4ba5f18b0de5 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期三, 20 一月 2021 10:53:01 +0800
Subject: [PATCH] 2021-01-20

---
 src/tabviews/zshare/actionList/asyncButtonComponent.jsx |   20 +++++++++++++++++++-
 1 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
index 695f378..1d48bf6 100644
--- a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
+++ b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx
@@ -21,12 +21,30 @@
       this.setState({component})
     }
 
+    // <Button className="loading-skeleton" disabled={true}></Button> // 楠ㄦ灦鎸夐挳
     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
+        }
+      }
 
       return C ?
         <C {...this.props} /> :
-        <Button className="loading-skeleton" disabled={true}></Button>
+        <Button className={'mk-btn mk-' + btn.class} style={style} icon={btn.icon} disabled={true} >{btn.label}</Button>
     }
   }
 }
\ No newline at end of file

--
Gitblit v1.8.0