Skip to content

Instantly share code, notes, and snippets.

@pferreirafabricio
Created November 20, 2023 18:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pferreirafabricio/48c4397d15a7960acea938e02494b58b to your computer and use it in GitHub Desktop.
Save pferreirafabricio/48c4397d15a7960acea938e02494b58b to your computer and use it in GitHub Desktop.
Example of how to bind slots in Vue 2
<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