天天看點

SweetAlert彈框插件相關

基本使用:

// 渲染函數
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)

SweetAlert彈框插件相關

常用屬性

SweetAlert彈框插件相關

彈框類型

SweetAlert彈框插件相關

彈框寬度

SweetAlert彈框插件相關

彈框位置

SweetAlert彈框插件相關

自動關閉

SweetAlert彈框插件相關

彈框按鍵

SweetAlert彈框插件相關
SweetAlert彈框插件相關