diff --git a/components/notification/demo/onclose.md b/components/notification/demo/onclose.md index 512eb23cb..ccaa026ff 100644 --- a/components/notification/demo/onclose.md +++ b/components/notification/demo/onclose.md @@ -17,7 +17,7 @@ var openNotification = function() { var args = { message: "这是标题", description: "这是提示框的文案这是提示框示框的文案这是提示是提示框的文案这是提示框的文案", - defaultClose: close + onClose: close }; notification.open(args); }; diff --git a/components/notification/index.jsx b/components/notification/index.jsx index 625231219..a98dcbb2a 100644 --- a/components/notification/index.jsx +++ b/components/notification/index.jsx @@ -44,7 +44,7 @@ function notice(args) { , duration: null, closable: true, - onClose: args.defaultClose, + onClose: args.onClose, style: {} }); } else { @@ -57,7 +57,7 @@ function notice(args) { , duration: null, closable: true, - onClose: args.defaultClose, + onClose: args.onClose, style: {} }); } else { @@ -84,7 +84,7 @@ export default { notice(args); }, close(key){ - Notification.notification.removeNotice(key); + notificationInstance.removeNotice(key); }, config(options) { top = isNaN(options.top) ? 24 : options.top;