报错
Avoided redundant navigation to current location: "/plan".
NavigationDuplicated: Avoided redundant navigation to current location: "/plan".
at createRouterError (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2056:15)
at createNavigationDuplicatedError (webpack-internal:///./node_modules/vue-router/dist/vue-router.esm.js:2026:15)
在router.js中添加如下:
// 避免跳转当前页面报错
const changePush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return changePush.call(this, location).catch((err) => err);
};