表单控件绑定

绑定

v-model

1
2
3
4
5
6
7
8
9
10
11
12
<div id="app">
<input v-model.lazy="message" placeholder="edit me">
<p>Message is: {{ message }}</p>
</div>
<script>
var app = new Vue({
el: '#app',
data: {
message: ''
}
})
</script>

修饰符

  • .lazy
  • .number
  • .trim