Vue路由传参两种方式

在vue-router路由中,传参方式通常分两种:vue 利用$route.query对象的Get方式传参,与http的get方式同样,会将参数暴露到地址栏,使用方式以下:vue-router 路由请求发起(编程式导航):vue-cli this.$router.push({path:'/selectById', query: {id: this.id}}); 参数接收:编程 {{this.$ro
相关文章
相关标签/搜索