$router.query和$router.params的区别

类型于get(query) 和 post(params)

1.query方式传参和接收参数

  传参:

     this.$router.push({

        path:"/xxx"

       query:{ id:id}

    })

接收参数:this.$router.query.id

2.params方法传参合接收参数

 传参:

    this.$router.push({

       path:"./xxx"

       params:{id:id}

    })

 接收参数:this.$router.params.id

原文地址:https://www.cnblogs.com/lj8023/p/9467906.html