按下按钮后如何显示另一个window?甜蜜警报2

How after pressing the button to show another window? sweetalert2

按下按钮后如何显示另一个 window 成功消息? 在 sweetalert2

最简单的方法是在 then 中调用另一个 Swal。最简单的例子是:

swal.fire({
  title: 'Input Text',
  input: 'text'
}).then(result => {
  swal.fire(`You wrote: ${result.value}`)
})

在这一个中,前一个模态返回的值在新模态中被重新使用。

您可以在 https://sweetalert2.github.io/

找到大量示例