1、vue 路由 如果传递 params 定义路由的时候是

 /路由名称:id

 

获取的时候 

this.$route.params.id

最后形如

   /路由名称/路由参数

传参的时候

params:{
    str1:str1,
    str2:str2  
}


2、如果传递query ?id=str.... 定义路由的时候直接是

 /路由名称

获取的时候

 this.$route.query.id

传参的时候

data:{
    str1:str1,
    str2:str2  
}

 



相关文章:

  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-07-17
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-01
  • 2022-12-23
  • 2023-03-10
  • 2021-10-14
  • 2022-12-23
相关资源
相似解决方案