| | |
| | | Tab: PropTypes.any, // 如果当前元素为标签时,tab为标签信息 |
| | | btn: PropTypes.object, // 按钮 |
| | | setting: PropTypes.any, // 页面通用设置 |
| | | updateStatus: PropTypes.func, // 按钮状态更新 |
| | | } |
| | | |
| | | state = { |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.updateStatus('refresh', btn.execSuccess, btn) |
| | | if (btn.execSuccess !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execSuccess, btn) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | loading: false |
| | | }) |
| | | |
| | | this.props.updateStatus('refresh', btn.execError, btn) |
| | | if (btn.execError !== 'never') { |
| | | MKEmitter.emit('refreshByButtonResult', btn.$menuId, btn.execError, btn) |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | return <div style={{display: 'inline-block'}} onClick={(e) => e.stopPropagation()}> |
| | | <Button |
| | | type="link" |
| | | title={show === 'icon' ? btn.label : ''} |
| | | loading={loading} |
| | | style={btn.btnstyle} |
| | | icon={show === 'text' ? '' : (show === 'icon' ? (btn.icon || 'upload') : (btn.icon || ''))} |