How to use the sweetalert2.DismissReason function in sweetalert2

To help you get started, we’ve selected a few sweetalert2 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github growu / drip-ionic3 / src / pages / main / main.ts View on Github external
chcp.installUpdate((error) => {
                                                loading.dismiss();
                                                if (error) {
                                                    this.toastProvider.show("安装更新失败:"+error.description+"("+error.code+")","error");
                                                } else {
                                                    this.toastProvider.show("安装更新成功","success");
                                                }
                                            },);
                                        }
                                    });

                                } else if (res.type == 2) { //跳转更新
                                    this.iab.create(res.url, '_blank', 'toolbar=yes');
                                }
                            }  else if (result.dismiss === swal.DismissReason.cancel) {
                                // this.storage.set('last_check_update_time',moment());
                            }
                        }, dismiss => {
github growu / drip-ionic3 / src / pages / goal-checkin / goal-checkin.ts View on Github external
let body = {
                            'goal': this.goal,
                            'checkin': params,
                            'user': this.user,
                            'event':data.event
                        };

                        let modal = this.modalCtrl.create('goal-checkin-succ', {'data': body});

                        modal.onDidDismiss(data => {
                            this.navCtrl.pop();
                        });

                        modal.present();
                    } else if(  result.dismiss === swal.DismissReason.cancel) {
                        console.log("cancel2");
                        this.navCtrl.popToRoot();
                    }

                }, dismiss => {
                    console.log("cancel");