Closed as not planned
Description
Vue version
3.2.47
Link to minimal reproduction
Steps to reproduce
- Create a component tree where prop name of a grandchild is the same as attribute name for the child
App.vue
<script setup>
import Comp1 from './Comp1.vue';
</script>
<template>
<Comp1
attribute-name="Attribute value from the parent"
/>
</template>
Comp1.vue
<script setup>
import Comp2 from './Comp2.vue';
</script>
<template>
<Comp2
attribute-name="Prop value from the parent"
/>
</template>
Comp2.vue
<script setup>
const props = defineProps({
attributeName: {
type: String,
'default': 'Default value',
},
});
</script>
<template>
{{ attributeName }}
</template>
What is expected?
Parent attributes should not rewrite prop values of children
Expected value: "Prop value from the parent"
What is actually happening?
Grandchild gets value from attribute of its grandparent and not from template of its parent
Actual value: "Attribute value from the parent"
System Info
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
No labels