-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Open
Description
Vue version
3.6.0-beta.7
Link to minimal reproduction
Steps to reproduce
- Define the prop for the Vapor component and use it in the template
// Child.vue
withDefaults(defineProps<{
is: string
}>(), {
is: 'Child'
})<template>
<div>{{ is }}</div>
</template>-
Use the Vapor component in the parent component and pass
:is="'Parent'"viav-bind -
At this point, the page displays
Childand a warning is shown indicating that a required prop is missing. Thev-bindpassing method is supported in VDOM mode.
What is expected?
- When passing the
isprop to a Vapor component viav-bind(e.g.,:is="'Parent'"), the component should correctly receive and render the dynamically bound value (Parent), instead of falling back to the default value (Child). - No false warning about a "required prop missing" should be thrown when the
isprop is passed viav-bind(consistent with the behavior in VDOM mode).
What is actually happening?
- When passing the
isprop to the Vapor component viav-bind(i.e.,:is="'Parent'"), the component does not receive the dynamically bound valueParent— instead, it renders the default valueChild(defined viawithDefaults). - A false warning is thrown in the console indicating that the required
isprop is missing, even though the prop is explicitly passed viav-bind. - This behavior is inconsistent with VDOM mode (where
v-bindfor theisprop works as expected, with no false warnings).
System Info
Any additional comments?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels