mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
add default html type + fix switch
This commit is contained in:
parent
a83b7dc516
commit
a543c7db6a
@ -90,6 +90,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
||||
loading: false,
|
||||
ghost: false,
|
||||
block: false,
|
||||
htmlType: 'button',
|
||||
};
|
||||
|
||||
static propTypes = {
|
||||
@ -219,6 +220,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
||||
break;
|
||||
case 'small':
|
||||
sizeCls = 'sm';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -265,7 +267,7 @@ class Button extends React.Component<ButtonProps, ButtonState> {
|
||||
<Wave>
|
||||
<button
|
||||
{...otherProps as NativeButtonProps}
|
||||
type={htmlType || 'button'}
|
||||
type={htmlType}
|
||||
className={classes}
|
||||
onClick={this.handleClick}
|
||||
ref={this.saveButtonRef}
|
||||
|
Loading…
Reference in New Issue
Block a user