Skip to content

Commit b421da8

Browse files
committed
feat: vuejs#149 add test for v-model.lazy
1 parent 8937e27 commit b421da8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/directives/on.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,8 @@ export const on: Directive = ({ el, get, exp, arg, modifiers }) => {
7878
}
7979

8080
listen(el, arg, handler, modifiers)
81+
82+
return () => {
83+
el.removeEventListener(arg!, handler, modifiers)
84+
}
8185
}

tests/model.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ <h2>Text Input</h2>
2222
{{ text }}
2323
<input v-model.trim="text" />
2424

25+
<h2>Text Input w/ lazy</h2>
26+
{{ text }}
27+
<input v-model.lazy="text" />
28+
2529
<h2>TextArea</h2>
2630
{{ text }}
2731
<textarea v-model.trim="text"></textarea>

0 commit comments

Comments
 (0)