202012-02 vue $router和$route的区别详解 一、router为VueRouter的实例,相当于一个全局的路由器对象,里面含有很多属性和子对象,例如history对象。。。经常用的跳转链接就可以用this.$router.push,和router-link跳转一样。。。this.$router.push会往history栈中添加一个新的记录。。详细见vue官方文档route相当于当前正在跳转的路由对象。。可以从里面获取name,path,params,query等。。打印this.$route和this.$router。路由传参的方式1.可以手写完整的path:this.$route... 继续阅读 >