king
2021-02-05 a8ec1d4136507d54580c2599fbfbc70a9a38ee62
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>
    }
  }
}