Answer the question
In order to leave comments, you need to log in
How to move the data for named slots into a separate module?
If I insert the data for the named slots into the component then everything works.
<template>
<span>
<template v-slot:top>
top content
</template>
<template v-slot:buttons>
buttons
</template>
<template v-slot:footer>
footer content
</template>
</span>
</template>
<template>
<span>
<slots>
</slots>
<template v-slot:footer>
footer content
</template>
</span>
</template>
Answer the question
In order to leave comments, you need to log in
No. A slot is part of the current component. But you can take out not the slots themselves, but their contents
<template>
<span>
<template v-slot:top>
<top-content />
</template>
<template v-slot:buttons>
<buttons />
</template>
<template v-slot:footer>
footer content
</template>
</span>
</template>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question