1.通過router-link 進行跳轉
<router-link to="/china-quotation/business-function/quotation-request"> -->
<!-- KA---quotation-request -->
<el-button plain @click="showDetail()">Detail</el-button>
<!-- </router-link>
2.通過vue的router進行頁面跳轉
this.$router.push({ name: 'QuotationRequest', query: { id: this.itemBomData.requestNo }}) // 此方法為從路由的name設置,進行跳轉
也可以使用路由跳轉
this.$router.push({ path: '/china-quotation/business-function/quotation-request', query: { id: this.itemBomData.requestNo }})
3.被跳轉的頁面接收參數
data(){
retrun:{
queryId:''
}
}
created () {
// 接收傳過來的id
this.queryId= this.$route.query.id
console.log(this.queryId)
this.getInfo(); //根據傳過來的參數進行對應的查詢操作
},