vue报错 NavigationDuplicated: Avoided redundant navigation to current location:
这个报错是重复路由引起的
只需在注册路由组建后使用下方重写路由就可以
router /index的页面里面 加入
//获取原型对象上的push函数
const originalPush = Router.prototype.push
//修改原型对象中的push方法
Router.prototype.push = function push(location: RawLocation) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
return (originalPush.call(this, location) as any).catch((err: any) => err)
}