Created
November 20, 2023 18:28
-
-
Save pferreirafabricio/48c4397d15a7960acea938e02494b58b to your computer and use it in GitHub Desktop.
Example of how to bind slots in Vue 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<template v-for="(_, slotName) in $slots" v-slot:[slotName]="scope"> | |
<slot :name="slotName" v-bind="scope" /> | |
</template> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment