vue路由跳转及传参

1.主页路由跳转,用 query 进行参数传递

 //抄表记录表册
      meterReadingDetailsList(row){
        this.$router.push({
          //跳转路径
          path:"/HouseSecurity/UnResident/MeterReadingDetails/meterReadingDetailsList",
          //传递参数
          query: {planId: row.planId,industrialUserId:row.industrialuserId,taskId:row.taskId}
         })
      },

2.跳转后的页面,接收参数方法:用 this.$route.query.参数名 进行接收

 this.queryParams.taskId = this.$route.query.taskId

你可能感兴趣的:(vue.js,前端,javascript)