Angular v6 SwalAlert2 总是显示一个复选框。我没有把它放在那里。我该如何解决?

Angular v6 SwalAlert2 always show a checkbox. I did not put it in there. How can I fix it?

import { default as swal } from 'sweetalert2';

swal({ title: 'Cargando..!', text: 'Espere por favor', allowOutsideClick: false, allowEscapeKey: false,
                allowEnterKey: false, onOpen: () => { swal.showLoading()} });

图像显示了一个加载器和我不想要的复选框

您有 2 个选择。

(1) 查看sweetalert2是否提供了隐藏复选框的选项。

(2) 使用CSS隐藏复选框

由于组件不应操纵其子项的 CSS,因此您应该将 CSS 放在全局样式表中 - styles.css - 或者在组件样式表中使用 ::ng-deep(已弃用)

示例:

styles.css

.annoying-checkbox {
  display: none;
}

或your.component.css

::ng-deep .annoying-checkbox {
  display: none; 
}