this.$router :
全局路由对象,任何页面都可以通过此方法 调用 push(), go()等方法。一般用于路由跳转。
例如:this.$router.push(路由)//跳转
this.$route :
表示当前正在用于跳转的路由器对象。可用来接收当前路由,显示其name、path、query、params等属性。
例如:this.$route.name//当前路由的名字
区别:
1.this.$router 是全局 路由对象 任何页面 都可以 调用
2.this.$route表示当前正在用于跳转的路由器对象,可以调用其name、path、query、params等属性;