| | |
| | | import './index.scss' |
| | | |
| | | const SubTabTable = asyncSpinComponent(() => import('@/tabviews/subtabtable')) |
| | | const CustomPage = asyncSpinComponent(() => import('@/tabviews/custom')) |
| | | |
| | | class NormalButton extends Component { |
| | | class PopupButton extends Component { |
| | | static propTpyes = { |
| | | show: PropTypes.any, // 按钮显示样式控制 |
| | | position: PropTypes.any, // 按钮位置,工具栏为toolbar |
| | |
| | | onClick={() => {this.actionTrigger()}} |
| | | >{show === 'icon' && btn.icon ? '' : btn.label}</Button> : null} |
| | | <Modal |
| | | className="popview-modal" |
| | | className={'popview-modal ' + (btn.$menuId ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | | width={'80vw'} |
| | | maskClosable={false} |
| | |
| | | ]} |
| | | destroyOnClose |
| | | > |
| | | <SubTabTable |
| | | {!btn.$menuId ? <SubTabTable |
| | | Tab={btn} |
| | | MenuID={btn.linkTab} |
| | | BID={popData ? primaryId : this.props.BID} |
| | | BData={popData || this.props.BData} |
| | | SupMenuID={this.props.MenuID} |
| | | refreshSupView={this.reloadtable} |
| | | /> |
| | | /> : null} |
| | | {btn.$menuId ? <CustomPage MenuID={btn.uuid} param={{BID: (popData ? primaryId : this.props.BID), data: (popData || this.props.BData)}} /> : null} |
| | | </Modal> |
| | | </div> |
| | | ) |
| | |
| | | return {} |
| | | } |
| | | |
| | | export default connect(mapStateToProps, mapDispatchToProps)(NormalButton) |
| | | export default connect(mapStateToProps, mapDispatchToProps)(PopupButton) |