报以下错误
vue-router.esm.js?3423:2065
Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation to current location: "/".
解决方法:
在router下写 这样就不会报错了,具体我也不知道什么意思
//核心:解决代码冗余
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}