NavigationDuplicated error

vue 路由重复点击报错:

NavigationDuplicated error

解决:

import Router from 'vue-router'

const originalPush = Router.prototype.push
Router.prototype.push = function push (location, onResolve, onReject) {
  return originalPush.call(this, location).catch(err => {
    return err
  })
}

https://github.com/vuejs/vue-router/issues/2881

你可能感兴趣的:(vue,vue)