使用场景:

    使用swal进行确认,是否执行某件事之后,点击确定之后,弹出成功或者失败的弹框

   关键设置    closeOnConfirm:false

 swal({
        title: '确定要删除【'+name+'】模板吗?',
        text: '',
        type: 'warning',
        showCancelButton: true,
        confirmButtonColor: "#DD6B55", //可有可无
        confirmButtonText: "确定",   //可有可无
        closeOnConfirm: false    //必须设置为false
    }, function (isConfirm) {
        if(isConfirm){
            // swal.disableButtons();
            loadDataByAjax(url, params, function (data) {
                if (data.status == 'success') {
                    swalsuccess();     //这里才能进行弹出
                    getDataOfCon();
                }else{
                    swal('', data.status, 'warning');
                };
            });
        }
        
    })

jquery - swal弹框的嵌套弹框(确认弹框)点击确定之后,请求成功 jquery - swal弹框的嵌套弹框(确认弹框)

 

 

 

 
jquery - swal弹框的嵌套弹框(确认弹框)
 

相关文章:

  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-28
  • 2021-10-22
  • 2022-12-23
  • 2021-11-01
相关资源
相似解决方案