admin管理员组

文章数量:1612098

vue项目中,重复点击路由会出现如下报错

解决办法:
在router的配置文件中(router -> index.js)加上:

const originalPush = Router.prototype.push
Router.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

即可解决

参考:
https://blog.csdn/xiecheng1995/article/details/106497172/?utm_medium=distribute.pc_relevant.none-task-blog-baidujs-1

本文标签: 报错promiseErrorAvoidedUncaught