NavigationDuplicated error
NavigationDuplicated: Avoided redundant navigation to current location 
This commit is contained in:
parent
bedbd3c872
commit
c410125c8f
|
@ -3,6 +3,13 @@ import Router from 'vue-router'
|
|||
|
||||
Vue.use(Router)
|
||||
|
||||
//获取原型对象上的push函数
|
||||
const originalPush = Router.prototype.push
|
||||
//修改原型对象中的push方法
|
||||
Router.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
const baseRouters = [{
|
||||
path: '/',
|
||||
redirect: '/login'
|
||||
|
|
Loading…
Reference in New Issue