refactor(compiler): remove modelValue from generated code for native v-model

This commit is contained in:
Evan You
2020-03-16 17:51:56 -04:00
parent 3b2d236714
commit 9eef37fa32
3 changed files with 34 additions and 35 deletions

View File

@@ -25,19 +25,18 @@ export const patchProp: RendererOptions<Node, Element>['patchProp'] = (
case 'style':
patchStyle(el, prevValue, nextValue)
break
case 'modelValue':
case 'onUpdate:modelValue':
// Do nothing. This is handled by v-model directives.
break
default:
if (isOn(key)) {
patchEvent(
el,
key.slice(2).toLowerCase(),
prevValue,
nextValue,
parentComponent
)
// ignore v-model listeners
if (key.indexOf('onUpdate:') < 0) {
patchEvent(
el,
key.slice(2).toLowerCase(),
prevValue,
nextValue,
parentComponent
)
}
} else if (!isSVG && key in el) {
patchDOMProp(
el,