vue 父子传参 简单写法 sync

父组件 :<child :pbi.sync = '' 参数内容 ''></child>

子组件:props获取      更新父组件中对应的 参数 : this.$emit('update : pbi' ,需更新的内容)

obj ={

     name:'11',

    age:'233'

}

v-bind:sync = obj //相当于把obj里的所有属性都传给子组件  

props{

       name: String 

}

this.$emit('update:name', '改变内容')

原文地址:https://www.cnblogs.com/cs122/p/9782572.html