From 76a4300654a18d228838c3f27455dc8e7a8cd616 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 15 一月 2021 17:04:42 +0800 Subject: [PATCH] Merge branch 'master' into bms --- src/tabviews/zshare/actionList/asyncButtonComponent.jsx | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) diff --git a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx index 34eb4ca..1d48bf6 100644 --- a/src/tabviews/zshare/actionList/asyncButtonComponent.jsx +++ b/src/tabviews/zshare/actionList/asyncButtonComponent.jsx @@ -25,10 +25,26 @@ 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={'mk-btn mk-' + btn.class} icon={btn.icon} disabled={true} >{btn.label}</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