冗余导航问题
解决办法, 插入如下代码
import Router from 'vue-router'
//使用push的方法
const RouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
return RouterPush.call(this, to).catch(err => err)
}
//使用replace的方法
const RouterReplace = Router.prototype.replace
Router.prototype.replace = function replace (to) {
return RouterReplace.call(this, to).catch(err => err)
}