Sweet Alert 2括号错误和phpstorm分析

时间:2017-12-26 05:53:26

标签: javascript jquery sweetalert sweetalert2

我尝试使用SweetAlert2,但我认为有一些错误,因为PhpStorm IDE说。

此代码与Git Lib完全相同。



swal({
    title: 'Giriş Başarılı',
    text: 'İki aşamalı doğrulama aktif size bir doğrulama kodu gönderiyoruz.',
    timer: 3000,
    onOpen: () => {
    swal.showLoading()
}
}).then((result) => { if (result.dismiss === 'timer') { window.location.href = 'dogrulama-kodu'; }
})

<script src="https://unpkg.com/sweetalert2@7.1.3/dist/sweetalert2.all.js"></script>
&#13;
&#13;
&#13;

PhpStorm Complated Analysis

PhpStorm Complated Analysis Screenshot

1 个答案:

答案 0 :(得分:0)

将JavaScript语言更改为ECMAScript 6

为此,请转到File -> Settings -> Languages & Frameworks -> JavaScript并将JavaScript语言版本更改为ECMAScript 6