Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
1 task
rockfang opened this issue Dec 16, 2020 · 2 comments
Closed
1 task

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

rockfang opened this issue Dec 16, 2020 · 2 comments
Labels

Comments

@rockfang
Copy link

  • 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函数自定义失败

@John60676
Copy link
Member

Duplicate of #3324

@John60676 John60676 marked this as a duplicate of #3324 Dec 16, 2020
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants