1.父传子
利用ref
https://www.cnblogs.com/lwx11111/p/17629539.html
2.子传父
2.1 父组件
<HiddenDangerList v-on:setHiddenId="setHiddenId"></HiddenDangerList>
setHiddenId (hiddenId) {
this.item.hiddenId = hiddenId;
},
2.2 子组件
fun () {
this.$emit('setHiddenId',hiddenId);
}
标签:父子,fun,组件,hiddenId,setHiddenId,传值
From: https://www.cnblogs.com/lwx11111/p/17635968.html