方法一
路徑:http://localhost:8080/#/index/1
cardData.projectId 是傳過去的值
路由:
參數使用:this.$route.params.id(這個id跟上圖路由的配置有關)
方法二
路徑:http://localhost:8080/#/index?name=1
跳轉</router-link>(id是參數)
參數使用:this.$route.query.id
this.$route是一個數組,里面包含路由的所有信息
注意:router-link中鏈接如果是‘/'開始就是從根路由開始,如果開始不帶‘/',則從當前路由開始。