方法一:this.$router.push({name:'webSearch',query:{name:'老李'}})获取参数:this.$route.query。name方法二:this.$router.push({path:'/webSearch',query:{name:'老李'}})获取参数:this.$route.query.name方法三:this.$router.push({name:'webSearch',params:{name:'老李'}})获取参数:this.$route.params.name注2:name后面的地址名称不需要包含/;path后面的地址名可以带或不带/注2:看图,地址后拼接后可以看到查询参数,但是看不到params
