vue页面传值有哪些方式
lewis
2019-03-11
26次阅读
vue中页面传值的方式有:1.拼接url传值;2.通过query传值;3.通过params传值;
vue中页面传值的方式有以下几种
1.拼接url传值
this.$router.push('/editCardetail?editType=add')参数:
editType=add:表示需传递的参数
2.通过query传值
this.$router.push({name:'editCardetail',
params:{
editType:add
}
})
3.通过params传值
this.$router.push({path:'/editCardetail',
query:{
editType:add
}
})

发表评论:
◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。