gpt4 book ai didi

javascript - AngularJs 中带有微调器的甜蜜警报对话框

转载 作者:数据小太阳 更新时间:2023-10-29 06:15:02 25 4
gpt4 key购买 nike

我正在尝试在 sweet alert 对话框中显示一个微调器,类似于 Bootstrap 模态对话框 ( http://jsfiddle.net/D6rD6/5/ )

我能想到的最接近的是这样的:

SweetAlert.swal({
title: '<small>Import errors occurred !</small>',
text: '<i class="fa fa-spinner" aria-hidden="true"></i>',
html: true,
customClass: 'manual-upload-errors-swal-width'
});

如果这不可能,那么最接近和最好的解决方案是什么?

最佳答案

原版sweet alert插件不支持,建议使用SweetAlert2插件。

迁移很简单,这里是迁移指南:Migration from SweetAlert to SweetAlert2

在 SweetAlert2 中有 swal.showLoading(),因此您可以像这样简单地显示加载模式:

Swal.fire('Please wait')
Swal.showLoading()
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>

关于javascript - AngularJs 中带有微调器的甜蜜警报对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40365771/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com