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
I frequently find myself pasting this incantation:
<template v-for="name in Object.keys($slots).filter(e => e != 'default')" #[name]="slotData">
<slot :name="name" v-bind="slotData || {}" />
</template>
When creating an outer component where you need to pass slots to a deep child, this becomes tedious.
Just like components can automatically inherit attributes, it would be handy if slots could be passed down like this (disabled with inheritSlots: false), and explicitly bound with v-slots="$slots".
I'm thinking:
<template>
<one>
<template #slot-for-three>
...should make it to three
</template>
</one>
</template>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Related to discussion #5962.
I frequently find myself pasting this incantation:
When creating an outer component where you need to pass slots to a deep child, this becomes tedious.
Just like components can automatically inherit attributes, it would be handy if slots could be passed down like this (disabled with
inheritSlots: false
), and explicitly bound withv-slots="$slots"
.I'm thinking:
one.vue:
Beta Was this translation helpful? Give feedback.
All reactions