diff --git a/components/notification/demo/basic.md b/components/notification/demo/basic.md index 10ca86ca4..eb537609b 100644 --- a/components/notification/demo/basic.md +++ b/components/notification/demo/basic.md @@ -18,6 +18,8 @@ var openNotification = function() { }; React.render( - -, document.getElementById('components-notification-demo-basic')); +
+ +
, +document.getElementById('components-notification-demo-basic')); ```` \ No newline at end of file diff --git a/components/notification/demo/onclose.md b/components/notification/demo/onclose.md index 386070fbb..512eb23cb 100644 --- a/components/notification/demo/onclose.md +++ b/components/notification/demo/onclose.md @@ -11,18 +11,20 @@ var notification = require('antd/lib/notification'); var close = function() { console.log("我被默认的关闭按钮关闭了!"); -}; +} var openNotification = function() { var args = { message: "这是标题", description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案", - onClose: close + defaultClose: close }; notification.open(args); }; React.render( - -, document.getElementById('components-notification-demo-onclose')); +
+ +
, +document.getElementById('components-notification-demo-onclose')); ```` \ No newline at end of file diff --git a/components/notification/demo/with-btn-onclose.md b/components/notification/demo/with-btn-onclose.md index 7511ef92b..e9d5eadaf 100644 --- a/components/notification/demo/with-btn-onclose.md +++ b/components/notification/demo/with-btn-onclose.md @@ -19,7 +19,7 @@ var close = function() { var onClose = function() { // 默认按钮关闭时的业务处理 console.log("我被默认的关闭按钮关闭了!"); -}; +} var btn = ; diff --git a/components/notification/demo/with-btn.md b/components/notification/demo/with-btn.md index 88fdc5e1b..655650396 100644 --- a/components/notification/demo/with-btn.md +++ b/components/notification/demo/with-btn.md @@ -21,11 +21,13 @@ var openNotification = function() { description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案", btn: btn, key: 'singleKey2' - }; + }; notification.open(args); }; React.render( - -, document.getElementById('components-notification-demo-with-btn')); +
+ +
, +document.getElementById('components-notification-demo-with-btn')); ```` \ No newline at end of file diff --git a/components/notification/index.jsx b/components/notification/index.jsx index f192f6876..625231219 100644 --- a/components/notification/index.jsx +++ b/components/notification/index.jsx @@ -44,7 +44,7 @@ function notice(args) { , duration: null, closable: true, - onClose: args.onClose, + onClose: args.defaultClose, style: {} }); } else { @@ -57,7 +57,7 @@ function notice(args) { , duration: null, closable: true, - onClose: args.onClose, + onClose: args.defaultClose, style: {} }); } else {