Slots માતાપિતાને બાળ ઘટક માં template સામગ્રી પાસ કરવા દે છે — આ છે કે તમે લવચીક, પુનઃઉપયોગી આવરણો (કાર્ડ, મોડલ્સ, લેઆઉટ) કેવી રીતે બનાવો જ્યાં ગ્રાહક આંતરિક માર્કઅપ નિયંત્રણ કરે.
મૂળભૂત slot
<!-- Card.vue -->
<template>
<div class="card">
<slot></slot> <!-- parent's content is injected here -->
</div>
</template>
<!-- parent -->
<Card>
<h2>Title</h2> <!-- this markup fills the slot -->
<p>Any content!</p>
</Card>
બાળ એક "છિद્ર" () વ્યાખ્યાયિત કરે છે; માતાપિતા તેને તેઓ જે માર્કઅપ ચાહે તે દ્વારા ભરે છે. આ સ્ટ્રીંગ્સ props દ્વારા પાસ કરતાં વધુ લવચીક છે.
