赞
踩
【前端】VUE动态修改路由的params和query参数
修改params
this.$router.push({
params: {...this.$route.params, name:this.name}
})
修改query
this.$router.push({
query: {...this.$route.query, name:this.name}
})
同时修改
this.$router.push({
params: {...this.$route.params, name: '李白'}
query: {...this.$route.query, name: '李白'}
})
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。