[Vuejs]-VUETIFY – How to pass slot to nested select component

1👍

VSelectWithValidation

You need to create slot inside your template slot item and bind scope data to able to use from other component ..

<template slot="item" slot-scope="data">
   <slot name="item" v-bind="data"></slot>
</template>

TestComponent

You can access that slot by writing v-slot:YourSlotName=”hereIsBindData”

<template v-slot:item="data">
    {{ data.item.name }} // you can code here whatever you like
</template>

Leave a comment