parent
ccf92564d3
commit
8c51c6514f
@ -18,7 +18,9 @@ import {
|
|||||||
type AssignerFn = (value: any) => void
|
type AssignerFn = (value: any) => void
|
||||||
|
|
||||||
const getModelAssigner = (vnode: VNode): AssignerFn => {
|
const getModelAssigner = (vnode: VNode): AssignerFn => {
|
||||||
const fn = vnode.props!['onUpdate:modelValue'] || (__COMPAT__ && vnode.props!['onModelCompat:input'])
|
const fn =
|
||||||
|
vnode.props!['onUpdate:modelValue'] ||
|
||||||
|
(__COMPAT__ && vnode.props!['onModelCompat:input'])
|
||||||
return isArray(fn) ? value => invokeArrayFns(fn, value) : fn
|
return isArray(fn) ? value => invokeArrayFns(fn, value) : fn
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,7 +80,7 @@ export const vModelText: ModelDirective<
|
|||||||
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 && el.type !== 'range') {
|
||||||
if (lazy) {
|
if (lazy) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user