和 router-link 没有关系。和你给路由对象的路由表有关系。 path 参数会和你当前的 url 匹配,component 会放在 router-view 中渲染new VueRouter({ routes: [ { path: '/user/:id', component: User } ] })
和
router-link
没有关系。和你给路由对象的路由表有关系。 path 参数会和你当前的 url 匹配,component 会放在 router-view 中渲染