feat: update notification

pull/309/head
tangjinzhou 2018-12-09 18:08:47 +08:00
parent f692f191f6
commit 4608fa546c
2 changed files with 3 additions and 2 deletions

View File

@ -20,7 +20,7 @@ The icon can be customized to any vue node or (h) => vue node.
this.$notification.open({
message: 'Notification Title',
description: 'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
icon: <a-icon type="smile-circle" style="color: #108ee9" />,
icon: <a-icon type="smile" style="color: #108ee9" />,
});
},
}

View File

@ -84,6 +84,7 @@ function getNotificationInstance (prefixCls, placement, callback) {
class: `${prefixCls}-${placement}`,
style: getPlacementStyle(placement),
getContainer: defaultGetContainer,
closeIcon: (h) => <Icon class={`${prefixCls}-close-icon`} type={'close'}/>,
}, (notification) => {
notificationInstance[cacheKey] = notification
callback(notification)
@ -93,7 +94,7 @@ function getNotificationInstance (prefixCls, placement, callback) {
const typeToIcon = {
success: 'check-circle-o',
info: 'info-circle-o',
error: 'cross-circle-o',
error: 'close-circle-o',
warning: 'exclamation-circle-o',
}