SweetAlert2 和 Ionic6 无法正确可视化的问题

1 javascript ionic-framework angular ionic6

我有一个在 Ionic 5 Angular 上编写的 Ionic 项目,其中有一些使用 SweetAlerts2 的弹出窗口。

今天我决定将 Ionic 更新为 Ionic6,但 SweetAlerts2 弹出窗口看起来不正确。就像警报仅在标题上可见,其他所有内容都是空白的。

问题截图:

Ionic6 可视化问题

代码:

swal.fire({
  html:
    '<br><label style="font-size:80%">Example Alert</label>',
  showDenyButton: true,
  confirmButtonText: "Confirm",
  denyButtonText: "Deny",
  denyButtonColor: 'grey',
  confirmButtonColor: 'var(--ion-color-primary)',
})
Run Code Online (Sandbox Code Playgroud)

重现问题的存储库

小智 7

这个问题已经在这个问题中解决了

只需将此选项与 Ionic Framework 结合使用即可。

heightAuto: false
Run Code Online (Sandbox Code Playgroud)