//詳情 點擊事件觸發 路由 跳轉
detail(index) {
this.$router.push({//路由的組件
path: "/huaxiainsuranceDetail",//路透跳轉的地址
query: {//路由跳轉,攜帶的參數
applyNoDetail: this.insuranceList[index].applyNo//參數
}
});
},
1.當點擊按鈕,detail事件時,發生頁面跳轉。
2.將本頁面的參數this.insuranceList[index].applyNo綁定給applyNoDetail
在/huaxiainsuranceDetail 頁面 取出 參數 applyNoDetail 方法爲
this.$route.query. applyNoDetail //可以全局使用
如果想攜帶多個值,用“,”逗號隔開