Support finally let axios

When we perform an promiseoperation, often accompanied by various states to make changes (such as a request to display at the beginning loading, at the end of the hidden loading), this state changes, if there is no finallyfunction, we need to thenand catchhave written this code, but with finallyfunction, we just need to write the code to function, because the finallyfunction logic, after the completion of the request either success or failure will be executed


How to support

Installation package promise.prototype.finally

npm i promise.prototype.finally -S

References to the use of
require("promise.prototype.finally").shim();

 

Guess you like

Origin www.cnblogs.com/luobiao/p/11344469.html
let