main.js 配置如下
import Router from 'vue-router';
//路由导航冗余报错(路由重复)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
2024-03-09 08:39:05
main.js 配置如下
import Router from 'vue-router';
//路由导航冗余报错(路由重复)
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}