SweetAlert 打开另一个警报并阻止关闭上一个警报

SweetAlert open another alert with prevent closing previous alert

我想打开另一个警报连同上一个警报并防止关闭上一个警报,但是上一个警报关闭并重新打开。 我使用了 iziToast,我可以做到这一点,但我想使用 SweetAlert。

SweetAlert 示例:

const swalToast = Swal.mixin({
  toast: true,
  iconColor: "white",
  customClass: { popup: "colored-toast" },
  showConfirmButton: false,
  timerProgressBar: true,
});

swalToast.fire({
  title: "One",
  position: "bottom",
  timer: 5000,
  icon: "info",
});

setTimeout(() => {
  swalToast.fire({
    title: "Two",
    position: "bottom",
    timer: 1500,
    icon: "info",
  });
}, 2000);

iziToast 示例:

iziToast.info({
  position: "bottomCenter",
  title: "One",
  message: "",
  timeout: 5000,
});

setTimeout(() => {
  iziToast.info({
    position: "bottomCenter",
    title: "Two",
    message: "",
    timeout: 1500,
  });
}, 2000);

根据设计,一次无法显示多个模式。

SweetAlert open another alert with prevent closing previous alert

Show two swal at same time

2 or more modals at the same time