作者: 文章来源:
本文原地址:https://www.mimiwuqi.com/biji/194988.html

Promise.prototype.finally = function(cb) {
return this.then(res => {
return Promise.resolve(cb()).then(() => res);
}, err => {
return Promise.resolve(cb()).then(() => { throw err });
});
}更多 建站笔记 请访问 https://www.mimiwuqi.com/biji/