2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-07 07:12:23 +03:00
Files
vue-select/docs/api/slots.md
T
2020-03-04 17:24:13 -08:00

1.4 KiB

selected-option

<slot name="selected-option" v-for="selected in scopedValues" v-bind="selected">
  <span :class="selected.bindings.class">
    {{ selected.label }}
    <component
    ref="deselectButtons"
    :is="selected.deselect.component"
    v-if="selected.deselect.bindings.multiple"
    v-bind="selected.deselect.bindings"
    v-on="selected.deselect.events"
    />
  </span>
</slot>
<slot name="search" v-bind="scope.search">
  <input v-bind="scope.search.attributes" v-on="scope.search.events">
</slot>

clear

<slot name="clear">
  <component
    ref="clearButton"
    :is="scope.clear.component"
    v-bind="scope.clear.bindings"
    v-on="scope.clear.events"
  />
</slot>

open-indicator

<slot name="open-indicator" v-bind="scope.openIndicator">
  <component
    v-if="scope.openIndicator.shouldDisplay"
    :is="scope.openIndicator.component"
    v-bind="scope.openIndicator.attributes"
  />
</slot>

spinner

<slot name="spinner" v-bind="scope.spinner">
  <div :class="scope.spinner.bindings.class" v-show="mutableLoading">Loading...</div>
</slot>

option

<slot name="option" v-for="option in scopedOptions" v-bind="option">
  <li v-bind="option.attributes" v-on="option.events">{{ option.label }}</li>
</slot>

no-options

<slot name="no-options">Sorry, no matching options.</slot>