Vue报错Error: Avoided redundant navigation to current locatiton 重复点菜单报错问题

解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题在这里插入图片描述

//路由页面添加以下代码:
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
    
    
	return originalPush.call(this, location).catch(err => err)
}

猜你喜欢

转载自blog.csdn.net/ka_xingl/article/details/116978824
今日推荐