Sweet Alert无法在Swal.update上添加微调器



我使用带角度9的sweet alert 2("sweet alert2":我的包.json上的"^9.7.2"(。

我无法在Swal.update 中添加微调器(加载gif(

在Swal.fire上很容易,就像这样:

Swal.fire({
title: 'Iniciando...',
allowOutsideClick: false,
allowEscapeKey: false,
allowEnterKey: false,
onBeforeOpen: () => {
Swal.showLoading();
}
});

在那次火灾之后,我想更新警报的信息,因为我用来自后端的新信息更新它。

所以,我做了这样的事情:

Swal.update({
title: this.requestStatusPipe.transform(status),
text: details
});

标题和文本每秒刷新一次。

我试着在更新中添加了很多东西来显示微调器,但没有成功。例如:

onBeforeOpen: () => {
Swal.showLoading();
}

也使用

onRender: () => {
Swal.showLoading();
}

Swal.showLoading();

Swal.update之后。什么都没用。

我读过所有的https://sweetalert2.github.io/没有这样的例子。

知道吗?


OBS(和更新(:我已经检查了元素,现在我意识到这是由于一些样式问题。不知怎的,旋转器的风格正在从改变

<button type="button" class="swal2-confirm swal2-styled" aria-label="" disabled="" style="display: inline-block; border-left-color: rgb(48, 133, 214); border-right-color: rgb(48, 133, 214);">OK</button>

<button type="button" class="swal2-confirm swal2-styled" aria-label="" disabled="" style="display: inline-block; border-left-color: rgba(0, 0, 0, 0); border-right-color: rgba(0, 0, 0, 0);">OK</button>

正如任何人都可以看到的那样,边界颜色在没有任何解释的情况下自动从rgb(48133214(更改为rgba(0,0,0,0(,从而使微调器不可见。

知道为什么会发生这种情况以及如何解决吗?

这是Sweet Alert中的一个错误。该问题已在9.10.13版本中得到解决。问题是:https://github.com/sweetalert2/sweetalert2/issues/1957

最新更新