diff --git a/components/button/button.jsx b/components/button/button.jsx index b6f49083c9..ec365a8213 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -26,7 +26,7 @@ function insertSpace(child) { export default class Button extends React.Component { render() { const props = this.props; - const {type, shape, size, onClick, className, children, ...others} = props; + const {type, shape, size, onClick, className, htmlType, children, ...others} = props; const classes = rcUtil.classSet({ 'ant-btn': true, @@ -39,7 +39,7 @@ export default class Button extends React.Component { const kids = React.Children.map(children, insertSpace); - return ; } diff --git a/components/button/index.md b/components/button/index.md index 0540041440..39a33002af 100644 --- a/components/button/index.md +++ b/components/button/index.md @@ -22,9 +22,10 @@ 属性 | 说明 | 类型 | 默认值 -----|-----|-----|------ type | 设置按钮类型,可选值为 `primary` `ghost` 或者不设 | Enum | undefined +htmlType | 设置 `button` 原生的 `type` 值,可选值请参考 HTML标准 | Enum | `button` shape | 设置按钮形状,可选值为 `circle` `circle-outline` 或者不设 | Enum | undefined size | 设置按钮大小,可选值为 `sm` `lg` 或者不设 | Enum | undefined loading | 设置按钮载入状态,存在为 `true`,不存在为 `false`,或直接设置值,如:`loading="true"` | Bool | false onClick | `click` 事件的 handler | Function | `function() {}` -- `` 最终会被渲染为 ``,并且除了上表中的属性,其它属性都会直接传到 `` +- `` 最终会被渲染为 ``,并且除了上表中的属性,其它属性都会直接传到 ``