From 539ac649982cc15a2762d888b43cad6f01fde469 Mon Sep 17 00:00:00 2001 From: afc163 Date: Mon, 17 Aug 2015 16:42:33 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=A4=E4=BA=86=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=A1=B5=E8=84=9A=E5=A4=96=EF=BC=8C=E7=82=B9=E5=87=BB=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E4=B8=8D=E9=9C=80=E8=A6=81=E6=89=8B=E5=8A=A8=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E5=85=B3=E9=97=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/modal/demo/basic.md | 6 ------ components/modal/demo/custom.md | 3 --- components/modal/index.jsx | 3 +-- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/components/modal/demo/basic.md b/components/modal/demo/basic.md index 1c034fb118..ea75bd061a 100644 --- a/components/modal/demo/basic.md +++ b/components/modal/demo/basic.md @@ -26,12 +26,6 @@ var Test = React.createClass({ visible: false }); }, - handleCancel() { - console.log('点击了取消'); - this.setState({ - visible: false - }); - }, render() { return
diff --git a/components/modal/demo/custom.md b/components/modal/demo/custom.md index 0d5c13e1c2..08848efce1 100644 --- a/components/modal/demo/custom.md +++ b/components/modal/demo/custom.md @@ -34,9 +34,6 @@ var Test = React.createClass({ }, handleCancel() { console.log('点击了取消'); - this.setState({ - visible: false - }); }, render() { return
diff --git a/components/modal/index.jsx b/components/modal/index.jsx index 5d5d8d8d1a..6099dc79cc 100644 --- a/components/modal/index.jsx +++ b/components/modal/index.jsx @@ -12,8 +12,7 @@ export default React.createClass({ }, handleCancel() { - var d = this.refs.d; - d.requestClose(); + this.refs.d.requestClose(); }, getDefaultProps() {