修改自https://github.com/pedant/sweet-alert-dialog