mirror of
https://github.com/tenrok/vue-select.git
synced 2026-05-17 02:29:37 +03:00
17 lines
483 B
Markdown
17 lines
483 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://sagalbot/NXBwYG?height=500) |