[Vuejs]-How to pass properties of a slot from child to parent

0👍

You should compose your template like this:

<DigitizePolygonButton>
    <template v-slot:slotDigitizePolygonBtnLabel="slotProps"> {{slotProps.text}} </template>
</DigitizePolygonButton>

The default value for isDigitizePolygonBtnDisabled is false – therefore you should not declare it as required so you could simply omit it in the parent.
If you need it to be required – then obviously there is no need for a default value as it will be always ignored by Vue.

Leave a comment