|
|
@ -61,7 +61,6 @@ export default class Button extends React.Component<ButtonProps, any> { |
|
|
|
static defaultProps = { |
|
|
|
prefixCls: 'ant-btn', |
|
|
|
loading: false, |
|
|
|
clicked: false, |
|
|
|
ghost: false, |
|
|
|
}; |
|
|
|
|
|
|
@ -83,6 +82,7 @@ export default class Button extends React.Component<ButtonProps, any> { |
|
|
|
super(props); |
|
|
|
this.state = { |
|
|
|
loading: props.loading, |
|
|
|
clicked: false, |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
@ -124,7 +124,7 @@ export default class Button extends React.Component<ButtonProps, any> { |
|
|
|
|
|
|
|
render() { |
|
|
|
const { |
|
|
|
type, shape, size = '', className, htmlType, children, icon, prefixCls, ghost, ...others, |
|
|
|
type, shape, size, className, htmlType, children, icon, prefixCls, ghost, ...others, |
|
|
|
} = this.props; |
|
|
|
|
|
|
|
const { loading, clicked } = this.state; |
|
|
@ -159,7 +159,7 @@ export default class Button extends React.Component<ButtonProps, any> { |
|
|
|
|
|
|
|
return ( |
|
|
|
<button |
|
|
|
{...omit(others, ['loading', 'clicked'])} |
|
|
|
{...omit(others, ['loading'])} |
|
|
|
type={htmlType || 'button'} |
|
|
|
className={classes} |
|
|
|
onClick={this.handleClick} |
|
|
|