From 77d47e5b75f8cf755ade18561273dce7d985df39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E4=BC=9F?= Date: Tue, 22 Jan 2019 12:45:47 +0800 Subject: [PATCH 1/2] modify message maxcount bug --- components/vc-notification/Notification.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/vc-notification/Notification.jsx b/components/vc-notification/Notification.jsx index f2573ea642..c60ba74979 100644 --- a/components/vc-notification/Notification.jsx +++ b/components/vc-notification/Notification.jsx @@ -67,7 +67,7 @@ const Notification = { remove(key) { this.setState(previousState => { return { - notices: previousState.notices.filter(notice => notice.key !== key), + notices: previousState.notices.filter(notice => notice.key !== key && notice.updateKey !== key), }; }); }, From bda0871c5b9e716a841e2fb50b3a6bc15c87d8a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E4=BC=9F?= Date: Wed, 23 Jan 2019 08:56:53 +0800 Subject: [PATCH 2/2] fix message maxcount bug --- components/vc-notification/Notification.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/vc-notification/Notification.jsx b/components/vc-notification/Notification.jsx index c60ba74979..d062825101 100644 --- a/components/vc-notification/Notification.jsx +++ b/components/vc-notification/Notification.jsx @@ -67,7 +67,7 @@ const Notification = { remove(key) { this.setState(previousState => { return { - notices: previousState.notices.filter(notice => notice.key !== key && notice.updateKey !== key), + notices: previousState.notices.filter(notice => notice.key !== key), }; }); }, @@ -81,7 +81,7 @@ const Notification = { const key = notice.updateKey ? notice.updateKey : notice.key; const { content, duration, closable, onClose, style, class: className } = notice; - const close = createChainedFunction(remove.bind(this, key), onClose); + const close = createChainedFunction(remove.bind(this, notice.key), onClose); const noticeProps = { props: { prefixCls,