Answers for "vue slots"

C#
3

v-slot

<base-layout>
  <template v-slot:header>
    <h1>Here might be a page title</h1>
  </template>

  <p>A paragraph for the main content.</p>
  <p>And another one.</p>

  <template v-slot:footer>
    <p>Here's some contact info</p>
  </template>
</base-layout>
Posted by: Guest on June-07-2021
0

vuejs slots events

Check the last comment from here:
https://github.com/vuejs/vue/issues/4332
Posted by: Guest on January-28-2021
0

nested slots in vue

<grand-child>
  <template v-for="(_, slot) in $slots">
    <template :slot="slot">
      <slot :name="slot"></slot>
    </template>
  </template>
</grand-child>
Posted by: Guest on September-15-2020
-2

what is slot in vue.js

// app.vue
<template>
  <current-user>
    <template v-slot:default="slotProps">{{ slotProps.user.firstName }}</template>    
  </current-user>
</template>
Posted by: Guest on August-16-2021
-1

vuejs how use this.$slots.default

console.log(this.$slots.default());
Posted by: Guest on January-12-2021

C# Answers by Framework

Browse Popular Code Answers by Language