mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
Remove Button's redundent code (#7176)
This commit is contained in:
parent
fdc8d357ef
commit
30e4fa8a8d
@ -122,13 +122,6 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
}
|
||||
}
|
||||
|
||||
// Handle auto focus when click button in Chrome
|
||||
handleMouseUp = (e: React.MouseEvent<HTMLButtonElement>) => {
|
||||
if (this.props.onMouseUp) {
|
||||
this.props.onMouseUp(e);
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
type, shape, size = '', className, htmlType, children, icon, prefixCls, ghost, ...others,
|
||||
@ -169,7 +162,6 @@ export default class Button extends React.Component<ButtonProps, any> {
|
||||
{...omit(others, ['loading', 'clicked'])}
|
||||
type={htmlType || 'button'}
|
||||
className={classes}
|
||||
onMouseUp={this.handleMouseUp}
|
||||
onClick={this.handleClick}
|
||||
>
|
||||
{iconNode}{kids}
|
||||
|
Loading…
Reference in New Issue
Block a user