| | |
| | | } |
| | | } |
| | | |
| | | componentDidMount() { |
| | | if (this.buttonRef && this.buttonRef.offsetHeight > 65) { |
| | | this.buttonRef.classList.add('double-line') |
| | | } |
| | | } |
| | | |
| | | shouldComponentUpdate (nextProps, nextState) { |
| | | return !is(fromJS(this.props), fromJS(nextProps)) || !is(fromJS(this.state), fromJS(nextState)) |
| | | } |
| | |
| | | if (fixed && MenuID) { |
| | | return ( |
| | | <Affix offsetTop={48}> |
| | | <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> |
| | | <div className="button-list toolbar-button" ref={ref => this.buttonRef = ref} id={fixed ? MenuID + 'mainaction' : ''}> |
| | | {this.getButtonList(actions)} |
| | | {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |
| | |
| | | ) |
| | | } else { |
| | | return ( |
| | | <div className="button-list toolbar-button" id={fixed ? MenuID + 'mainaction' : ''}> |
| | | <div className="button-list toolbar-button" ref={ref => this.buttonRef = ref} id={fixed ? MenuID + 'mainaction' : ''}> |
| | | {this.getButtonList(actions)} |
| | | {mores ? <Dropdown overlay={<div className="mk-button-dropdown-wrap">{this.getButtonList(mores)}</div>} trigger={['hover']}> |
| | | <div className="mk-button-more">更多<DownOutlined/></div> |