File tree 1 file changed +13
-8
lines changed
packages/runtime-core/src
1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -190,19 +190,20 @@ export function updateProps(
190
190
for ( const key in rawCurrentProps ) {
191
191
if (
192
192
! rawProps ||
193
- (
194
- // for camelCase
195
- ! hasOwn ( rawProps , key ) &&
193
+ // for camelCase
194
+ ( ! hasOwn ( rawProps , key ) &&
196
195
// it's possible the original props was passed in as kebab-case
197
196
// and converted to camelCase (#955)
198
197
( ( kebabKey = hyphenate ( key ) ) === key || ! hasOwn ( rawProps , kebabKey ) ) )
199
198
) {
200
199
if ( options ) {
201
- if ( rawPrevProps && (
200
+ if (
201
+ rawPrevProps &&
202
202
// for camelCase
203
- rawPrevProps [ key ] !== undefined ||
204
- // for kebab-case
205
- rawPrevProps [ kebabKey ! ] !== undefined ) ) {
203
+ ( rawPrevProps [ key ] !== undefined ||
204
+ // for kebab-case
205
+ rawPrevProps [ kebabKey ! ] !== undefined )
206
+ ) {
206
207
props [ key ] = resolvePropValue (
207
208
options ,
208
209
rawProps || EMPTY_OBJ ,
@@ -255,7 +256,11 @@ function setFullProps(
255
256
let camelKey
256
257
if ( options && hasOwn ( options , ( camelKey = camelize ( key ) ) ) ) {
257
258
props [ camelKey ] = value
258
- } else if ( ! emits || ! isEmitListener ( emits , key ) ) {
259
+ } else if (
260
+ ( ! emits || ! isEmitListener ( emits , key ) ) &&
261
+ // ignore v-model listeners
262
+ ! key . startsWith ( `onUpdate:` )
263
+ ) {
259
264
// Any non-declared (either as a prop or an emitted event) props are put
260
265
// into a separate `attrs` object for spreading. Make sure to preserve
261
266
// original key casing
You can’t perform that action at this time.
0 commit comments