javascript - 启动另一个时不要隐藏 SweetAlert2
问题描述
我正在使用 SweetAlert2。我想在另一个警报后面显示一个警报,以便当用户单击“确定”按钮时,另一个警报会显示在它后面。
解决方案
配置文档上的许多演示/示例: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>
推荐阅读
- c - 如何在独立环境中的内核中获取输入?
- java - 如何在 Eclipse 中恢复嵌套项目
- flutter - 值通知器
#97fe7(去健身房) - javascript - NodeJS 多类文件意外行为 process.on('uncaughtException')
- azure - Azure 流分析 npm 包不适用于 yaml 管道
- ios - 'FIRMessaging' 和 'FIRInstanceID' 在不同的模块中有不同的定义
- jfrog-xray - JFrog XRay 分析错误版本
- angular - 如何获取反应形式的字段总数以及有效和无效字段?
- nginx - 带有 K8s 的 Nginx Ingress 控制器返回 404
- python - django.core.exceptions.FieldError:为 Post 指定的未知字段(模型)