【vue】$router 和 $route 的区别

$router 是在全局定义的,调用 this.$router 可以看到定义过的全部 route

$route 是局部定义的,调用 this.$route 只可以看到当前的 route

posted @ 2021-12-12 15:17  RikkaXl  阅读(30)  评论(0)    收藏  举报