Closed Reconnact closed 10 months ago
Unfortunately I couldn't create a reporduction. I'll do it as soon as I find time. Create a component with two named slots. Then use it in markdown:
::my-title # Here is my title #subtitle Here is my subtitle ::
Now create a component that looks like this:
<template> <div> <p> <ContentSlot :use="$slots.subtitle" unwrap="p" /> </p> <ContentSlot :use="$slots.default" unwrap="p" /> </div> </template>
Instead of rendering the subtitle and then rendering the default slot it always renders the default slot. I had this bug on these nuxt versions:
default
UPDATE: I found the issue and was able to resolve it. But i think it is still a bug. Here you can see how it is working: https://stackblitz.com/edit/nuxt-starter-3i7tou?file=components%2Ftest.vue
As you can see the only "difference" is that my ContentSlot component looks like this:
ContentSlot
<ContentSlot :use="$slots.subtitle" unwrap="p" />
Instead of this:
No response
Environment
Build Modules: -
Reproduction
Unfortunately I couldn't create a reporduction. I'll do it as soon as I find time. Create a component with two named slots. Then use it in markdown:
Now create a component that looks like this:
Describe the bug
Instead of rendering the subtitle and then rendering the
default
slot it always renders the default slot. I had this bug on these nuxt versions:UPDATE: I found the issue and was able to resolve it. But i think it is still a bug. Here you can see how it is working: https://stackblitz.com/edit/nuxt-starter-3i7tou?file=components%2Ftest.vue
As you can see the only "difference" is that my
ContentSlot
component looks like this:Instead of this:
Additional context
No response
Logs
No response