-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Closed
Description
Version
3.0.2
Reproduction link
https://jsfiddle.net/pqte0h2s/
Steps to reproduce
Just like declared $props
are removed from $attrs
and are never inherited,
declared $emits
should also be removed from $attrs
.
It looks like they aren't and this can cause unexpected behaviors.
In the linked repro, try to type in the input box. The outer y
variable shouldn't change.
What is expected?
y
shouldn't change, because the C1
component doesn't raise update:modelValue
event.
onUpdateModelValue
can be found in $attrs
, which I wouldn't expect.
What is actually happening?
y
is updated, because the app @update:modelValue
event was put into $attrs
, which the C1
component passes down to input
.
Only unknown events (that are not declared in emits
) should be found in $attrs
.
vhoyer
Metadata
Metadata
Assignees
Labels
No labels