Skip to content

双向数据绑定 v-model 的实现原理

大概

  • input 元素的 value = this.name
  • 绑定 input 事件 this.name = $event.target.value
  • data 更新触发 re-render

https://lzwdot.com/docs/26879

基于 MIT 许可发布