Skip to content

Commit 119e4d3

Browse files
asolopovaskazupon
authored andcommitted
Fix v-model section (vuejs#813)
Hi, v-model section requires extra line to make this code complete. Otherwise it causes a problem: ``` render: function (createElement) { var self = this return createElement('input', { domProps: { value: self.value }, on: { input: function (event) { self.value = event.target.value // This line should be added self.$emit('input', event.target.value) } } }) } ``` Otherwise the value is updated in the one way. Please see example http://codepen.io/asolopovas/pen/OpWVxa?editors=1011
1 parent 3bc0435 commit 119e4d3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/v2/guide/render-function.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,7 @@ render: function (createElement) {
299299
on: {
300300
input: function (event) {
301301
self.value = event.target.value
302+
self.$emit('input', event.target.value)
302303
}
303304
}
304305
})

0 commit comments

Comments
 (0)