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(); //根据传过来的参数进行对应的查询操作
},


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM