基本使用:
// 渲染函数
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)
常用属性
弹框类型
弹框宽度
弹框位置
自动关闭
弹框按键