.native
.sync
- 真正的双向绑定会带来维护上的问题,因为子组件可以修改父组件 和
.sync 自动更新父组件属性的 v-on 监听器
<child :foo.sync=”msg”></child>
this.$emit( “update:foo”, newValue );
.native
.sync
.sync 自动更新父组件属性的 v-on 监听器
<child :foo.sync=”msg”></child>
this.$emit( “update:foo”, newValue );