king
2023-06-15 a29d9d644a2a30e9ef4afcc6d728c20c218dc359
src/tabviews/zshare/actionList/asyncButtonComponent.jsx
@@ -21,14 +21,27 @@
      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.style) {
        style.marginRight = btn.style.marginRight || ''
        style.marginLeft = btn.style.marginLeft || ''
        style.marginTop = btn.style.marginTop || ''
        style.marginBottom = btn.style.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>
    }
  }
}