Subscribe on changes!

Nested named slots not rendering

avatar
Jan 29th 2021

Version

3.0.5

Reproduction link

https://codepen.io/mirkojov/pen/VwmwPYe

Steps to reproduce

If component named slot is a child component named slot, it does not render. However, sub-component default slot is rendered. This can be seen in the example if the following section is removed:

<template v-slot:foobar>
Grandchild #foobar
</template>

What is expected?

Same behavior as with default nested slot.

What is actually happening?

Templates not rendering.


@vue/compiler-sfc throws error: Codegen node is missing for element/if/for node. Apply appropriate transforms first.

avatar
Jan 29th 2021

Hey, is this what you want? https://codepen.io/hcysunyang/pen/GRNRWJB

avatar
Jan 29th 2021

Yes, this is what I expected. Probably not possible without explicitly specifying slots in the child template?

avatar
Jan 29th 2021

Yes, you should specify slots explicitly in the child component, and strictly speaking, your usage is wrong, so I close this.