antdesign——notification消息提醒自定义两个按钮

antdesign——notification消息提醒自定义两个按钮_第1张图片

		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,javascript,前端,html)