.sync 修饰符

<!--父-->
<text-document :title.sync="doc.title"></text-document>

<!--子-->
this.$emit('update:title', newTitle)

v-model

<!--父-->
<text-document v-model="title"></text-document>

<!--子-->

model:{
    prop:'title',
    event:'change'
}
props:{
    title:String
}

this.$emit('change',new_title)

非 Prop 的 Attribute

$attrs 与 $listeners

$attrs: 除了props的其他属性
多层封装

inheritAttrs: false

<!--默认情况下父作用域的不被认作 props 的 attribute 绑定 (attribute bindings) 
    将会“回退”且作为普通的 HTML attribute 应用在子组件的根元素上。-->

$attr 显示在根元素上 不会被prop接收