NavigationDuplicated: Avoided redundant navigation to current location:
NavigationDuplicated:避免了对当前位置的冗余导航:
router.js文件中添加
Vue.use(VueRouter);
// 解决导航重复
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err);
};