king
2023-04-07 20185ab64a165df51515d9fa1c9b12a7a8c55f59
src/tabviews/custom/components/card/cardcellList/asyncButtonComponent.jsx
@@ -1,6 +1,4 @@
import React, {Component} from 'react'
import { Button } from 'antd'
/**
 * @description 异步加载模块
 * @param {*} importComponent
@@ -21,14 +19,17 @@
      this.setState({component})
    }
    componentWillUnmount () {
      this.setState = () => {
        return
      }
    }
    // <Button className="loading-skeleton" disabled={true}></Button> // 骨架按钮
    render() {
      const C = this.state.component
      const btn = this.props.btn || {}
      return C ?
        <C {...this.props} /> :
        <Button className={'mk-btn mk-' + btn.class} type={btn.show !== 'button' ? 'link' : ''} icon={btn.icon} disabled={true} >{btn.label}</Button>
      return C ? <C {...this.props} /> : null
    }
  }
}