fix: notification error #63

pull/77/merge
tjz 2018-07-05 21:01:43 +08:00
parent e4d0a12839
commit ebe942dd76
1 changed files with 3 additions and 5 deletions

View File

@ -134,17 +134,15 @@ function notice (args) {
)
}
const autoMarginTag = (!description && iconNode)
? <span class={`${prefixCls}-message-single-line-auto-margin`} />
: null
getNotificationInstance(outerPrefixCls, placement || defaultPlacement, (notification) => {
notification.notice({
content: (h) => (
<div class={iconNode ? `${prefixCls}-with-icon` : ''}>
{iconNode && iconNode(h)}
<div class={`${prefixCls}-message`}>
{autoMarginTag}
{(!description && iconNode)
? <span class={`${prefixCls}-message-single-line-auto-margin`} />
: null}
{typeof message === 'function' ? message(h) : message}
</div>
<div class={`${prefixCls}-description`}>