I have a parent component that wraps multiple children \'child\'. I want the parent to essentially have the same template as the vanilla markup which is why I am using the r
First of all, I think that this.$props
will always be undefined. The $props
property is accessible in a template like {{ $props }}
, but those inline properties (frustratingly) don't always map up directly to the this
variable available in the component's script. You can see the component's prop values using this.$options.propsData
.
Secondly, you can use item.componentOptions.propsData
to set the property values of the child component. (I think item.data.props
is a misnomer referencing something else). Here's a fiddle with the change.