![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
组件传值
前端的一只小白
全栈摸索中
展开
-
地址跳转路由传参的两种方式 页面之间的传值方式
1.在地址显示内容的传参方式:this.$route.query首先跳转的地方写入要跳转的路由以及要传的参数this.$router.push({ path: '路由地址', query: { data1: '参数string', data2: { data21: '', data22: {} }原创 2022-04-24 16:04:20 · 1126 阅读 · 2 评论 -
vue中this.$router.push路由传参方法
在vue项目中通过this.$router.push路由跳转页面传递参数的方式经常用到,一般有两种方式:1.name+params传参方式:[name为要跳转的路由名,params为要传递的参数]this.$router.push({name:'success',params:{username:'tom',value:'04652'}}); 注意:如果要传递多个参数,可以先封装成对...原创 2018-12-29 11:19:06 · 1823 阅读 · 0 评论