vue 路由重复点击,报错处理
路由重复点击,控制台会弹出提醒
// 在VueRouter上配置路由跳转,在router中的index.js中加上以下代码,注意加在use之前 const routerPush = VueRouter.prototype.push; VueRouter.prototype.push = function (location) { return routerPush.call(this, location).catch(err => {}) };
路由重复点击,控制台会弹出提醒
// 在VueRouter上配置路由跳转,在router中的index.js中加上以下代码,注意加在use之前 const routerPush = VueRouter.prototype.push; VueRouter.prototype.push = function (location) { return routerPush.call(this, location).catch(err => {}) };