vue-admin-element 页面跳转

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(); //根据传过来的参数进行对应的查询操作
},
posted @ 2021-02-07 17:56  吃不棒的胖胖糖  阅读(2186)  评论(0编辑  收藏  举报