vue-simple-alert
vue-simple-alert copied to clipboard
About Timer
When I try to use SweetAlertOptions timer and timerProgressBar, timer is working but timerProgressBar is not working. I take
Unknown parameter "timerProgressBar"
warning.
And when I try to add addEventListener to toastr I can't use Swal.stopTimer and Swal.resumeTimer functions of sweetalert2 . What can I use instead of them?
Thats the example
this.$fire({
title: "Toastr Title",
text: "Toastr Text",
toast: true,
background: "#ed4d44",
showConfirmButton: false,
position: "bottom-end",
customClass: {
content: "custom",
title: "custom"
},
timer: 3000,
timerProgressBar: true, //Not working
onOpen: toast => {
toast.addEventListener("mouseenter", Swal.stopTimer); //
toast.addEventListener("mouseleave", Swal.resumeTimer); //
}
}).then(r => {
console.log(r.value);
});
Thank you.