const key = `open${Date.now()}` // 弹窗标识,关闭的时候传入
notification.info({
message: data.title,
description: data.text,
duration: 10,
btn: h => h('div',
[
h('a-button',
{
props: {
size: 'small'
},
attrs: {
style: 'margin-right:40px'
},
on: {
click: () => notification.close(key)
}
}, '稍后处理'),
h('a-button', {
props: {
type: 'primary',
size: 'small'
},
on: {
click: () => {
router.push('/order/orderList?orderId=' + data.orderId)
notification.close(key)
}
}
}, '立即处理')
]),
key
})
antdesign——notification消息提醒自定义两个按钮
最新推荐文章于 2024-06-17 15:52:54 发布