首页 > 其他 > 详细

vue使用this.$router跳转路由与传值取值

时间:2021-06-08 17:15:27      阅读:19      评论:0      收藏:0      [点我收藏+]
本窗口打开:
  传参:
    this.$router.push({ name: ‘info-detail‘, params: {id: id}})
  取参:
    this.$route.params.id
新窗口打开
  传参:
    window.open(this.$router.resolve({ path: ‘info-detail‘, query: { id: id} }).href,  ‘_blank‘)
  取参:
    this.$route.query.id

vue使用this.$router跳转路由与传值取值

原文:https://www.cnblogs.com/coderxin/p/14862806.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!