king
2025-03-07 d8de196a5311f9ad7a01dbb988e0ad12b50f87e8
src/tabviews/zshare/actionList/asyncButtonComponent.jsx
@@ -21,12 +21,27 @@
      this.setState({component})
    }
    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="loading-skeleton" disabled={true}></Button>
        <Button className={'mk-btn mk-' + btn.class} style={style} disabled={true} >{btn.label}</Button>
    }
  }
}