| | |
| | | } |
| | | |
| | | componentDidMount () { |
| | | MKEmitter.addListener('popclose', this.popclose) |
| | | MKEmitter.addListener('popclose', this.syspopclose) |
| | | MKEmitter.addListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.addListener('openNewTab', this.openNewTab) |
| | | MKEmitter.addListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | this.setState = () => { |
| | | return |
| | | } |
| | | MKEmitter.removeListener('popclose', this.popclose) |
| | | MKEmitter.removeListener('popclose', this.syspopclose) |
| | | MKEmitter.removeListener('openNewTab', this.openNewTab) |
| | | MKEmitter.removeListener('triggerBtnId', this.actionTrigger) |
| | | MKEmitter.removeListener('refreshPopButton', this.refreshPopButton) |
| | |
| | | } |
| | | } |
| | | |
| | | syspopclose = () => { |
| | | if (!this.state.visible) return |
| | | |
| | | this.popclose() |
| | | } |
| | | |
| | | /** |
| | | * @description 弹窗关闭 |
| | | */ |
| | |
| | | className={'popview-modal ' + (btn.$view === 'CustomPage' ? 'custom-popview' : '')} |
| | | title={btn.label} |
| | | width={ratio} |
| | | maskClosable={false} |
| | | maskClosable={btn.clickouter === 'close'} |
| | | visible={visible} |
| | | onCancel={this.popclose} |
| | | footer={[ |
| | |
| | | className={btn.$view === 'CustomPage' ? 'custom-drawer-popview' : ''} |
| | | width={width} |
| | | height={height} |
| | | maskClosable={false} |
| | | maskClosable={btn.clickouter === 'close'} |
| | | onClose={this.popclose} |
| | | visible={visible} |
| | | placement={btn.placement || 'right'} |