有两种:query 传参 params传参
编程式传参: // 命名的路由 this.$router.push({ name: 'user', params: { userId: 123 }}) // 带查询参数,变成 /register?plan=123 this.$router.push({ path: 'register', query: { plan: '123' }}) 声明式传参: //子路由配置 { path: '/child, name: 'Child', component: Child } //父路由组件 <router-link :to="{name:'Child',query:{id:123}}">进入Child路由</router-link> <router-link :to="{name:'Child',params:{id:123}}">进入Child路由</router-link>