You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is expected because both syntaxes were different and they are unified only in Vue 3 to avoid breaking changes in Vue 2. More details have been given in similar issues, tldr is: $slots directly contains vnode while $scopedSlots contains functions to create those vnodes, slot="name" uses $slots while v-slot uses $scopedSlots. $slots of scoped slots are only available after mounting when the vnodes have been created. If for some reason the slot is not being rendered (e.g. with a v-if), $slots will stay empy
Version
2.6.11
Reproduction link
https://codepen.io/tehciolo/pen/zYKaRQK
Steps to reproduce
Check console
What is expected?
I would expect this.$slots to be populated at the same stage for both syntaxes (old and new).
What is actually happening?
this.$slots is populated only starting with
mounted
when usingv-slot
syntaxThis issue seems related to #9458
The text was updated successfully, but these errors were encountered: