fix(v-model): should not trigger updates during input composition (#1183)
This commit is contained in:
parent
520cad7d4d
commit
83b7158017
@ -54,7 +54,8 @@ export const vModelText: ModelDirective<
|
||||
el.value = value
|
||||
el._assign = getModelAssigner(vnode)
|
||||
const castToNumber = number || el.type === 'number'
|
||||
addEventListener(el, lazy ? 'change' : 'input', () => {
|
||||
addEventListener(el, lazy ? 'change' : 'input', e => {
|
||||
if ((e.target as any).composing) return
|
||||
let domValue: string | number = el.value
|
||||
if (trim) {
|
||||
domValue = domValue.trim()
|
||||
|
Loading…
Reference in New Issue
Block a user