admin管理员组

文章数量:1612065

跳转重复路由导致的报错

Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/login"

解决方案:
在 router 文件下,添加如下代码

Vue.use(Router)

//*******以下为添加内容*******
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
  return VueRouterPush.call(this, to).catch(err => err)
}
//******以上为添加内容*********

export default new Router({

本文标签: 跳转报错路由AvoidedNavigationDuplicated