diff --git a/components/popconfirm/index.jsx b/components/popconfirm/index.jsx index 231baed17e..eb16b1d41e 100644 --- a/components/popconfirm/index.jsx +++ b/components/popconfirm/index.jsx @@ -13,22 +13,29 @@ export default React.createClass({ transitionName: '', placement: 'top', trigger: 'click', - onConfirm: function() {}, - onCancel: function() {} + onConfirm: function () { + }, + onCancel: function () { + } }; }, - confirm: function() { + confirm: function () { this.props.onConfirm.call(this); this.setState({ visible: false }); }, - cancel: function() { + cancel: function () { this.props.onCancel.call(this); this.setState({ visible: false }); }, + onVisibleChange(v){ + this.setState({ + visible: v + }); + }, render() { const overlay =