Navigating to current location ("/threeFloor") is not allowed

vue路由跳转同一个路由多次点击出现以下报错Navigating to current location ("/threeFloor") is not allowed
解决办法
在router/index.js页面添加
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}Navigating to current location ("/threeFloor") is not allowed