[Vuejs]-Vue Named Slots Caveat?

0👍

In case anyone else runs into this issue, it’s a bit of a sneaky one.

It looks like if you do conditional rendering on markup that is supposed to override a slot, the default slot will render in its place when it is not conditionally rendered.

So, the simple solution is to use v-show instead of v-if when you try to override the component slot.

(Has nothing to do with nested component slots as originally suspected)

Leave a comment