📌  相关文章
📜  Uncaught (in promise) cancel - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:14.401000             🧑  作者: Mango

代码示例1
swal({
  …
}).then(function(json_data) {
  …
}, function(dismiss) {
  if (dismiss === 'cancel') { // you might also handle 'close' or 'timer' if you used those
    // ignore
  } else {
    throw dismiss;
  }
})