fix(v-model): v-model listeners should not fallthrough to plain element root
fix #1643
This commit is contained in:
@@ -3,7 +3,7 @@ import { patchStyle } from './modules/style'
|
||||
import { patchAttr } from './modules/attrs'
|
||||
import { patchDOMProp } from './modules/props'
|
||||
import { patchEvent } from './modules/events'
|
||||
import { isOn, isString, isFunction } from '@vue/shared'
|
||||
import { isOn, isString, isFunction, isModelListener } from '@vue/shared'
|
||||
import { RendererOptions } from '@vue/runtime-core'
|
||||
|
||||
const nativeOnRE = /^on[a-z]/
|
||||
@@ -35,7 +35,7 @@ export const patchProp: DOMRendererOptions['patchProp'] = (
|
||||
default:
|
||||
if (isOn(key)) {
|
||||
// ignore v-model listeners
|
||||
if (!key.startsWith('onUpdate:')) {
|
||||
if (!isModelListener(key)) {
|
||||
patchEvent(el, key, prevValue, nextValue, parentComponent)
|
||||
}
|
||||
} else if (shouldSetAsProp(el, key, nextValue, isSVG)) {
|
||||
|
||||
Reference in New Issue
Block a user