vue路由传递对象
传参var row = {id:2,name:1}this.$router.push({path: '/index', query: {row: encodeURIComponent(JSON.stringify(row))}});接收参数console.log(JSON.parse(decodeURIComponent(this.$route.query.row)))
·
传参
var row = {id:2,name:1}
this.$router.push({path: '/index', query: {row: encodeURIComponent(JSON.stringify(row))}});
接收参数
console.log(JSON.parse(decodeURIComponent(this.$route.query.row)))
更多推荐
已为社区贡献1条内容
所有评论(0)