diff --git a/components/alert/index.jsx b/components/alert/index.jsx index c87fbc31e7..5035e8f7d3 100644 --- a/components/alert/index.jsx +++ b/components/alert/index.jsx @@ -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/tag/index.jsx b/components/tag/index.jsx index 229b821c49..7f54f403f1 100644 --- a/components/tag/index.jsx +++ b/components/tag/index.jsx @@ -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, });