Vue报错: Uncaught (in promise) NavigationDuplicated: Avoided redundant navigation
重复点击相同路由,出现的问题
在【 src/router/index.js】中添加
Vue.use(Router)
const router = new Router({
routes
})
const VueRouterPush = Router.prototype.push
Router.prototype.push = function push (to) {
return VueRouterPush.call(this, to).catch(err => err)
}