![](https://img2022.cnblogs.com/blog/2043353/202205/2043353-20220509145616995-868848147.png)
在路由文件中加上以下代码
// const originalReplace = VueRouter.prototype.replace; // VueRouter.prototype.replace = function push(location) { // return originalReplace.call(this, location).catch(err => err); // };
push ....等雷同替换即可
在路由文件中加上以下代码
// const originalReplace = VueRouter.prototype.replace; // VueRouter.prototype.replace = function push(location) { // return originalReplace.call(this, location).catch(err => err); // };
push ....等雷同替换即可