vue中路由传参容易疏忽的一点
使用query传参:
this.$router.push({path:'路由表中提前配置的path信息'},query:{key:value})
使用params传参:
this.$router.push({name:'路由表中提前配置的name信息'},params:{key:value})
用错及出错,谨防踩坑!
this.$router.push({path:'路由表中提前配置的path信息'},query:{key:value})
使用params传参:
this.$router.push({name:'路由表中提前配置的name信息'},params:{key:value})
用错及出错,谨防踩坑!