需要区分 bootbox.alert() 和 bootbox.confirm() ,这两种样式在同一页面中

Need to differentiate bootbox.alert() and bootbox.confirm() ,both styles of modal in same page

我在同一个页面中有多个 bootbox.alert() 和 bootbox.confirm() 模态需要清楚地添加不同的样式但到目前为止运气不好,我如何定义自己的样式 类 对于这些模态。

var alertModal = bootbox.alert(
                {
                    title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></i> Alert",
                    message: "Please select Patient from Queue",
                })
            alertModal.find('.modal-header')
                .css(
                {
                    'background-color': 'red',
                    'color': 'white'
                }
                );
            alertModal.find('.modal-footer')
                .css({
                    'background-color': 'green',
                    'color': 'white'
                }
                );

在文档link Dialog Options中,您可以看到,给出了可选类名的选项。

var alertModal = bootbox.alert(
{
    title: "<i class='fa fa-exclamation-circle' style='font-size: 20px; color: white'></i> Alert",
    message: "Please select Patient from Queue",
    className:"your custom class name here"
})

您可以创建单独的 类 用于警报并确认并在选项中传递它