vue-cli中route和router的区别

在使用vue-router的时候经常分不清router和route的区别:

  在函数式编程中:

  this.$router.push('/login') 或者Router.push()

  在动态获取路由参数时:

  this.$route.params.xxx