diff --git a/components/button/button.jsx b/components/button/button.jsx index 73e82e2f3e..7ea7ea6bfd 100644 --- a/components/button/button.jsx +++ b/components/button/button.jsx @@ -25,7 +25,7 @@ function insertSpace(child) { } function clearButton(button) { - button.className = button.className.replace(`${prefix}clicked`, ''); + button.className = button.className.replace(` ${prefix}clicked`, ''); } export default class Button extends React.Component { diff --git a/components/cascader/index.md b/components/cascader/index.md index 1857abff10..a3342375b4 100644 --- a/components/cascader/index.md +++ b/components/cascader/index.md @@ -27,7 +27,7 @@ | defaultValue | 默认的选中项 | array |[] | | value | 指定选中项 | array | - | | onChange | 选择完成后的回调 | `function(value, selectedOptions)` | - | -| displayRender | 选择后展示的渲染函数 | `function(label)`` | `function(label) { return label.join(' / ') }` | +| displayRender | 选择后展示的渲染函数 | `function(label)` | `label => label.join(' / ')` | | style | 自定义样式 | string | - | | className | 自定义类名 | string | - | | popupClassName | 自定义浮层类名 | string | - | diff --git a/components/dropdown/demo/dropdown-button.md b/components/dropdown/demo/dropdown-button.md index c4fddb9d7d..5c06095383 100644 --- a/components/dropdown/demo/dropdown-button.md +++ b/components/dropdown/demo/dropdown-button.md @@ -10,8 +10,8 @@ import { Menu, Dropdown } from 'antd'; const DropdownButton = Dropdown.Button; -function handleButtonClick() { - console.log('click button'); +function handleButtonClick(e) { + console.log('click left button', e); } function handleMenuClick(e) { diff --git a/components/dropdown/dropdown-button.jsx b/components/dropdown/dropdown-button.jsx index 675f97c5c9..2298d8532f 100644 --- a/components/dropdown/dropdown-button.jsx +++ b/components/dropdown/dropdown-button.jsx @@ -21,14 +21,14 @@ export default React.createClass({ }; }, render() { - const { type, overlay, trigger, align, children, className, ...restProps } = this.props; + const { type, overlay, trigger, align, children, className, onClick, ...restProps } = this.props; const cls = classNames({ 'ant-dropdown-button': true, className: !!className, }); return ( - +