79723882

Date: 2025-08-03 08:34:44
Score: 1.5
Natty:
Report link
// you need to pass to the slot, as a prop:
// ChildComponent.vue
<script setup>
const data = `
This is the data

I want to get at it.
`
</script>

<template>
  <slot :data="data">
    <div>
       {{ data }}
    </div>
  </slot>
</template>
// then, access them like this, in the Parent component:

// ParentComponent.vue
<template>
  <ChildComponent>
      <template v-slot:default="{ data }"></template>
  </ChildComopnent>
</template>
Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Daniel Qolami