vue router 传递参数

vue-router 传参的方式 query 和params

query 类似于get请求的传参方法 就是 ? 这种形式的 https://i.cnblogs.com/EditPosts.aspx?opt=1

今天发现了个重要的问题  

params传递参数的时候不能用path跳转 , 可以用name

this.$router.push({ name: '审批主页',params:item})  这种的可以传过去
但是this.$router.push({ path: '/xxx',params:item})  这种就不行
 
posted @ 2018-08-30 11:53  JGG靖哥哥  阅读(111)  评论(0编辑  收藏  举报