启动另一个时不要隐藏 SweetAlert2

Don't hide SweetAlert2 when another is launched

我正在使用 SweetAlert2。我想在另一个警报后面显示一个警报,这样当用户单击 "OK" 按钮时,另一个警报会显示在它后面。

许多 demos/examples 配置文档:https://sweetalert2.github.io/#configuration
将其添加为 Promise,然后在当前 SweetAlert 之后启动。

Swal.fire("1").then(x =>
  Swal.fire("2").then( x =>
    x.value && Swal.fire("3")))
    // check x.value, only fire "3" if button clicked
.then( x =>
  Swal.queue(["5","6","7"]))
  // you can also use queue to queue up alerts
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>