Sweetalert: μž‘νžˆμ§€ μ•Šμ€ μ˜ˆμ™Έ: μ·¨μ†Œ

에 λ§Œλ“  2016λ…„ 12μ›” 01일  Β·  5μ½”λ©˜νŠΈ  Β·  좜처: t4t5/sweetalert

이 였λ₯˜λŠ” Sweetalert2μ—μ„œ "μ·¨μ†Œ" λ²„νŠΌμ„ ν΄λ¦­ν•˜λ©΄ ν‘œμ‹œλ©λ‹ˆλ‹€.

swal({ title: menu_title, text: title, input: "text", showCancelButton: true, animation: "slide-from-top", showLoaderOnConfirm: true, inputPlaceholder: lang.write_your_comment, preConfirm: function(inputValue) { return new Promise(function(resolve, reject) { resolve('ok'); }); }) }, allowOutsideClick: false }).then(function(result){ var res = $.parseJSON(result); if(res.status){ swal({ title: lang.thankyou+"!", text: lang.your_feedback_sent, type: "success" }).then(function(confirm){ location.reload(); }); } else{ swal({ title: lang.sorry+"!", text: res.message, type: "warning" }); } });

κ°€μž₯ μœ μš©ν•œ λŒ“κΈ€

λˆ„κ΅°κ°€ μ—¬κΈ° μ™€μ„œ λ§‰νž 경우 ( sweetalert != sweetalert2 !)

swal({...}) 끝에 λ‹€μŒμ„ μΆ”κ°€ν•©λ‹ˆλ‹€. .catch(() => swal.close())

λͺ¨λ“  약속 ν•¨μˆ˜μ—λŠ” μ‹€νŒ¨ 콜백이 ν•„μš”ν•©λ‹ˆλ‹€.

λͺ¨λ“  5 λŒ“κΈ€

λ‹«κΈ° μ•„μ΄μ½˜μ„ ν΄λ¦­ν•˜λ©΄ 였λ₯˜λ„ ν‘œμ‹œλ©λ‹ˆλ‹€.
μž‘νžˆμ§€ μ•Šμ€ μ˜ˆμ™Έ: λ‹«κΈ°

여기에 κ²Œμ‹œν•΄μ•Ό ν•©λ‹ˆλ‹€: https://limonte.github.io/sweetalert2/

λˆ„κ΅°κ°€ μ—¬κΈ° μ™€μ„œ λ§‰νž 경우 ( sweetalert != sweetalert2 !)

swal({...}) 끝에 λ‹€μŒμ„ μΆ”κ°€ν•©λ‹ˆλ‹€. .catch(() => swal.close())

λͺ¨λ“  약속 ν•¨μˆ˜μ—λŠ” μ‹€νŒ¨ 콜백이 ν•„μš”ν•©λ‹ˆλ‹€.

@eminx 당신이 λ‚΄ ν•˜λ£¨λ₯Ό κ΅¬ν–ˆμŠ΅λ‹ˆλ‹€ :)

@eminx λ‚˜λ„!!

이 νŽ˜μ΄μ§€κ°€ 도움이 λ˜μ—ˆλ‚˜μš”?
0 / 5 - 0 λ“±κΈ‰