Skip to content

2.x版本中 Notification组件中使用h函数自定义按钮失败 #3370

Closed
@rockfang

Description

@rockfang
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.0.0-rc.4

Environment

Chrome, ant-design-vue 2.x版本

Reproduction link

https://2x.antdv.com/components/notification-cn/#components-notification-demo-custom-close-button

Steps to reproduce

查看官网示例中notification中自定义图标
https://2x.antdv.com/components/notification-cn/#components-notification-demo-custom-close-button

核心代码:
notification.open({
message: 'Notification Title',
description:
'A function will be be called after the notification is closed (automatically after the "duration" time of manually).',
btn: () => {
return h(
'a-button',
{
type: 'primary',
size: 'small',
onClick: () => notification.close(key),
},
'Confirm',
);
},
key,
onClose: close,
});

What is expected?

希望使用h函数自定义生效

What is actually happening?

h函数自定义失败

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions