1. vue路由跳转及传参、获取参数

vue路由跳转及传参、获取参数

1. query方式

  跳转传参:this.$router.push({

        name:'customerView',// 要跳转页面的名字(router文件里的name)

        query:{

          customerNo:this.customerNo, //参数1

          customerName:this.customerName, //参数2

          }

        })

  获取参数:this.$route.query.customerNo

       this.$route.query.customerName

 

posted @ 2021-05-12 18:52  sunshineG  阅读(530)  评论(0编辑  收藏  举报