赞
踩
query
this.$router.push({path:'/router1', query: { id: 123}})
-------------/router1?id=123
获取: this.$route.query.id
this.$router.push({ name: 'router1', params: { type: 1 }})
--------------/router1/1
获取: this.$route.params.type
params传参,push中只能是name: 'xxx',params只能用name引入路由
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。