我正在使用SweetAlert2并在IE 11上引發(fā)異常:此程序包需要一個承諾庫,請包括一個墊片,以使其能夠在這個瀏覽器中(參見: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)因為IE 11不支持Promises,所以需要手動添加。我像這樣使用bluebird:const Promise = require('bluebird');const Swal = require('sweetalert2');Swal.fire(...)...但是,sweetalert的支票還是沒有通過:.. if (typeof Promise === 'undefined') { error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)'); }..如何解決?謝謝。
SweetAlert2在IE 11上不起作用,未定義Promise
達令說
2021-04-09 17:19:19