重复性跳转
解决方法:
在main.js里面
引入vue-router
import VueRouter from "vue-router";
然后再在main.js最下面添加
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err);
};
就好了! 亲测有效!