**this.$router 实际上 就是全局 路由对象 任何页面 都可以 调用 push
(), go()等方法**
this.$route 表示当前正在用于跳转的路由器对象,可以调用其name、path、query、params等属性;
本文深入解析Vue中的this.$router和this.$route对象。$router作为全局路由对象,可在任何页面调用push()、go()等方法实现页面跳转。$route则表示当前用于跳转的路由器对象,可获取name、path、query、params等属性,便于理解和操作路由状态。
**this.$router 实际上 就是全局 路由对象 任何页面 都可以 调用 push
(), go()等方法**
this.$route 表示当前正在用于跳转的路由器对象,可以调用其name、path、query、params等属性;
1250
1883

被折叠的 条评论
为什么被折叠?