vue-router.esm.js?8c4f:2051 Uncaught (in promise) NavigationDuplicated {_name: "NavigationDuplicated", name: "NavigationDuplicated"
, message: "Navigating to current location ("/login") is not allowed", stack: "Error? at new NavigationDuplicated (webpack-int…l (webpack-internal:///./src/http/axios.js:29:57)"}
// 在使用Element UI 時(shí)點(diǎn)擊同一個(gè)路由褥芒,控制臺(tái)報(bào)錯(cuò)宋雏,但不影響使用,下面是自己網(wǎng)上搜的解決方法:
import Router from 'vue-router'
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}