vue中route和router区别
1, route 当前路由信息
只读为主,你用它来获取:path / name / params / query / hash / meta / matched 等
// 读当前路由参数
this.$route.params.id
this.$route.query.keyword
this.$route.path
2, router 路由器实例(“怎么跳转、怎么管理路由”)
this.$router.push({ name: 'detail', params: { id: 1 } })
this.$router.replace('/login')
this.$router.back()

浙公网安备 33010602011771号