2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-04 06:32:23 +03:00
Files
vue-select/docs/docs/digging-deeper/templating.md
T
Jeff b48fd94e4f add codepen theme
fix templating pen height
2018-08-15 17:00:20 -07:00

18 lines
480 B
Markdown

#### Scoped Slot `option`
vue-select provides the scoped `option` slot in order to create custom dropdown templates.
```html
<v-select :options="options" label="title">
<template slot="option" slot-scope="option">
<span :class="option.icon"></span>
{{ option.title }}
</template>
</v-select>
```
Using the `option` slot with `slot-scope="option"` gives the
provides the current option variable to the template.
<CodePen url="NXBwYG" height="500"/>