如何在按下按钮后显示另一个成功消息窗口?在sweetalert2
最简单的方法是在then
中调用另一个Swal。最简单的例子是:
swal.fire({
title: 'Input Text',
input: 'text'
}).then(result => {
swal.fire(`You wrote: ${result.value}`)
})
在这一个中,前一个模态返回的值将在新模式中重复使用。
你可以在https://sweetalert2.github.io/找到很多例子