axios之cancelToken取消上一次的请求

有时候屡次点击按钮发送请求须要取消上一次的请求,这时候可使用cancelTokenios submit(){ //this.cancel1() //使用this.cancel1()取消请求 this.cancel1?this.cancel1():'' //若是上次请求没结束,就先取消上次的请求 let self=this this.$axios .g
相关文章
相关标签/搜索