fix: notification style error, close #4703

pull/4738/head
tangjinzhou 3 years ago
parent a5a3411c28
commit 022a3ce795

@ -37,14 +37,15 @@ export default defineComponent({
message: 'Notification Title',
description:
'A function will be be called after the notification is closed (automatically after the "duration" time of manually).',
btn: h(
btn: () =>
h(
Button,
{
type: 'primary',
size: 'small',
onClick: () => notification.close(key),
},
'Confirm',
{ default: () => 'Confirm' },
),
key,
onClose: close,

@ -172,7 +172,8 @@ function notice(args: NotificationArgsProps) {
const duration = args.duration === undefined ? defaultDuration : args.duration;
getNotificationInstance(args, notification => {
notification.notice({
content: ({ prefixCls }) => {
content: ({ prefixCls: outerPrefixCls }) => {
const prefixCls = `${outerPrefixCls}-notice`;
let iconNode = null;
if (icon) {
iconNode = () => <span class={`${prefixCls}-icon`}>{renderHelper(icon)}</span>;

Loading…
Cancel
Save