vue-router query和params傳參(接收參數)$router $route的區別

1.query方式傳參和接收參數 傳參: this.$router.push({ path:'/xxx' query:{ id:id } }) 接收參數: this.$route.query.id 注意:傳參是this.$router,接收參數是this.$route,這裏千萬要看清了!!! this.$rou
相關文章
相關標籤/搜索