vu项目中的this.$route的bug问题

情况1:使用this.$route.query获取this.$router.push('/login?redirect = xxx'),发现能获取到this.$route和this.$route.query的值,但是获取不到this.$route.query.redirect的值。

情况2:使用this.$route.query获取this.$router.push({path:'/login',params:{redirect:xxx}),发现能获取到this.$route和this.$route.query和this.$route.query.redirect的值。就正常,很神奇,不知道为啥。

posted on 2021-05-13 14:22  chenzejie6030  阅读(390)  评论(0)    收藏  举报

导航