vue this.$router.push query传递对象方法
this.$router.push({path: '/home',query: {params: JSON.stringify({ name: 'lokka', age: 18 })}});let params = JSON.parse(this.$route.query.params)this.name = params.name;this.age = params.age;
·
this.$router.push({
path: '/home',
query: {
params: JSON.stringify({ name: 'lokka', age: 18 })
}
});
let params = JSON.parse(this.$route.query.params)
this.name = params.name;
this.age = params.age;
更多推荐
已为社区贡献10条内容
所有评论(0)