parent
2581cfb707
commit
ac74e1dd33
@ -80,11 +80,14 @@ export const vModelText: ModelDirective<
|
|||||||
mounted(el, { value }) {
|
mounted(el, { value }) {
|
||||||
el.value = value == null ? '' : value
|
el.value = value == null ? '' : value
|
||||||
},
|
},
|
||||||
beforeUpdate(el, { value, modifiers: { trim, number } }, vnode) {
|
beforeUpdate(el, { value, modifiers: { lazy, trim, number } }, vnode) {
|
||||||
el._assign = getModelAssigner(vnode)
|
el._assign = getModelAssigner(vnode)
|
||||||
// avoid clearing unresolved text. #2302
|
// avoid clearing unresolved text. #2302
|
||||||
if ((el as any).composing) return
|
if ((el as any).composing) return
|
||||||
if (document.activeElement === el) {
|
if (document.activeElement === el) {
|
||||||
|
if (lazy) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (trim && el.value.trim() === value) {
|
if (trim && el.value.trim() === value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user