Vue路由NavigationDuplicated {_name NavigationDuplicated
SunSeekerX / 2019-08-27 / Coding / 阅读量 1059

Vue路由NavigationDuplicated {_name NavigationDuplicated

NavigationDuplicated {_name: "NavigationDuplicated

1566270383897.png

查询后解决方式如下

app/main.js

import Router from 'vue-router'

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