在 Vue.js 中,你可以使用 $route.params 来访问路由参数。如果你的路由配置是 { path: '/your-path/:id', component: YourComponent },那么你可以在 YourComponent 组件中这样获取到 id 参数: ex..