vue 動態路由參數設置

1、 params 參數 router.push({ path: /user/${userId} }) 用反引號(`)標識css 路由以路徑形式存在web const userId = 123 router.push({ name: ‘user’, params: { userId }}) // -> /user/123 router.push({ path: `/user/${userId}`
相關文章
相關標籤/搜索