diff --git a/components/alert/index.tsx b/components/alert/index.tsx index c87fbc31e7..5035e8f7d3 100644 --- a/components/alert/index.tsx +++ b/components/alert/index.tsx @@ -29,7 +29,7 @@ export default class Alert extends React.Component { this.setState({ closing: false, }); - this.props.onClose.call(this, e); + this.props.onClose(e); } animationEnd = () => { this.setState({ diff --git a/components/dropdown/dropdown-button.tsx b/components/dropdown/dropdown-button.tsx index 1aeeb067eb..c2bb4c5506 100644 --- a/components/dropdown/dropdown-button.tsx +++ b/components/dropdown/dropdown-button.tsx @@ -24,7 +24,7 @@ export default class DropdownButton extends React.Component { ['type', 'overlay', 'trigger', 'align', 'children', 'className', 'onClick']); const cls = classNames({ 'ant-dropdown-button': true, - className: !!className, + [className]: !!className, }); return ( diff --git a/components/form/style/index.less b/components/form/style/index.less index a075a67d9e..78b9907751 100644 --- a/components/form/style/index.less +++ b/components/form/style/index.less @@ -274,7 +274,7 @@ form { visibility: visible; font-family: "anticon" !important; .square(@input-height-lg); - line-height: @input-height-lg + 2; + line-height: @input-height-lg; text-align: center; font-size: 14px; animation: zoomIn .3s @ease-out-back; diff --git a/components/tag/index.tsx b/components/tag/index.tsx index 70d7a05fa1..ede10c8257 100644 --- a/components/tag/index.tsx +++ b/components/tag/index.tsx @@ -25,10 +25,9 @@ export default class Tag extends React.Component { this.props.onClose(e); if (e.defaultPrevented) return; const dom = ReactDOM.findDOMNode(this); - const domWidth = dom.getBoundingClientRect().width; - dom.style.width = `${domWidth}px`; + dom.style.width = `${dom.getBoundingClientRect().width}px`; // It's Magic Code, don't know why - dom.style.width = `${domWidth}px`; + dom.style.width = `${dom.getBoundingClientRect().width}px`; this.setState({ closing: true, });