标签:throw param token ajax pre else fun script OLE
var CancelToken = axios.CancelToken; var source = CancelToken.source(); axios.get(‘/user/12345‘, { cancelToken: source.token }).catch(function(thrown) { if (axios.isCancel(thrown)) { console.log(‘Request canceled‘, thrown.message); } else { // handle error } }); // cancel the request (the message parameter is optional) source.cancel(‘Operation canceled by the user.‘);
标签:throw param token ajax pre else fun script OLE
原文地址:https://www.cnblogs.com/handsome-jm/p/9512954.html