1
我已經使用SweetAlert庫在我的應用程序中顯示彈出窗口。這是我的代碼如何在SweetAlert彈出窗口中添加關閉按鈕
swal({
title: "Are you sure?",
text: "Test message?",
type: "info",
showCancelButton: true,
focusConfirm: false,
confirmButtonColor: "#DD6B55",
confirmButtonText: "Yes",
cancelButtonText: "No"
}, function (isConfirm) {})
我需要在右上角添加一個關閉按鈕。基於文檔,關閉按鈕僅適用於SweetAlert2庫。
是否可以在SweetAlert1庫中添加關閉按鈕?
看來你使用AngularJS。爲什麼不使用** ngSweetAlert **? https://github.com/oitozero/ngSweetAlert – Zooly
我已經在我的應用程序中使用了sweetalert。我不能使用任何其他庫 –
還有一個取消按鈕,它也可以用來關閉彈出 –