路由跳轉
第一種:
<router-link to='需要跳轉到的頁面的路徑‘>
//瀏覽器在解析時,將它解析成一個類似於<a> 的標簽。
第二種
this.$router.push({ path:'/user'})
動態路由(可傳遞參數)
this.$router.push({path: 'goodsDetails/',query:{productId: id}})
獲取路由參數
this.$route.query.productId