vue路由切换时取消以前的全部请求

在main.js文件里javascript import router from 'router/'; import Vue from 'vue'; Vue.Cancel = []; router.beforeEach((to, from, next) => { while (Vue.Cancel.length > 0) { Vue.Cancel.shift()('can
相关文章
相关标签/搜索