父组件
<messageForm @createMsgCallback="addCreateMsg" :name="sendForm.name"></messageForm>
子组件
props:{
name:{
type:String
}
},
computed: {
computedName(){
return this.name
}
},
watch:{
'name':function(val) {
console.log(val);
this.sendForm.name = val
}
},