mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
+2
-3
@@ -10,14 +10,13 @@ vue-select provides the scoped `option` slot in order to create custom dropdown
|
|||||||
|
|
||||||
```html
|
```html
|
||||||
<v-select :options="options" label="title">
|
<v-select :options="options" label="title">
|
||||||
<template slot="option" slot-scope="option">
|
<template v-slot:option="option">
|
||||||
<span :class="option.icon"></span>
|
<span :class="option.icon"></span>
|
||||||
{{ option.title }}
|
{{ option.title }}
|
||||||
</template>
|
</template>
|
||||||
</v-select>
|
</v-select>
|
||||||
```
|
```
|
||||||
|
|
||||||
Using the `option` slot with `slot-scope="option"` gives the
|
Using the `option` slot with props `"option"` provides the current option variable to the template.
|
||||||
provides the current option variable to the template.
|
|
||||||
|
|
||||||
<CodePen url="NXBwYG" height="500"/>
|
<CodePen url="NXBwYG" height="500"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user