基本使用:
// 渲染函數
Swal.fire({
// 彈框屬性,可根據需求更改
position: 'top',
type: 'success',
title: '修改成功',
showConfirmButton: true,
confirmButtonText: 'ok',
timer: 1500
//.then(value =>{})函數用于确認按鈕按下後的操作
}).then(value => {
if (value) {
$("#editForm input").val("");
$("#editForm select").val("");
$("#editForm textarea").val("");
$("#editModal").modal("hide");
window.location.href = "/appointment/list"
...
}
})
彈框類型(type)
常用屬性
彈框類型
彈框寬度
彈框位置
自動關閉
彈框按鍵