taro路由传参this.$router.params获取不到值

一、用法

二、问题

  排除调传参写法无误之后,this.$router.params一直无法获取到路由参数

三、解决方法

  确保this.$router.params是在跳转目标页使用this.$router.params仅能在跳转成功的目标页获取到值,目标页的子组件里是拿不到值的,需要进一步传值。

原文地址:https://www.cnblogs.com/yang-shun/p/12467521.html