Scoped slot doesn't work with custom component
Version
3.0.0-rc.9
Reproduction link
https://jsfiddle.net/pdqm4kfe/1/
Steps to reproduce
Open jsfiddle
What is expected?
I want to see scoped data in a component
What is actually happening?
I see empty slot
When shorthand syntax is used on the component it is considered to be specifying the slot of that component.
Correct usage:
<my-comp #test="slotProps">
<my-comp2>
<span class="green">{{ slotProps.item }}<span>
</my-comp2>
</my-comp>
Or, to be more explicit, use a <template>
:
<my-comp>
<template #test="slotProps">
<my-comp2>
<span class="green">{{ slotProps.item }}<span>
</my-comp2>
</template>
</my-comp>