2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

Add a higher level slot to labels so they can be customized completely

This commit is contained in:
Thom Hurks
2017-10-23 22:16:41 +02:00
parent f836eaeb6a
commit cbdc5982fd
+4 -1
View File
@@ -282,7 +282,9 @@
<div :dir="dir" class="dropdown v-select" :class="dropdownClasses"> <div :dir="dir" class="dropdown v-select" :class="dropdownClasses">
<div ref="toggle" @mousedown.prevent="toggleDropdown" :class="['dropdown-toggle', 'clearfix', {'disabled': disabled}]"> <div ref="toggle" @mousedown.prevent="toggleDropdown" :class="['dropdown-toggle', 'clearfix', {'disabled': disabled}]">
<span class="selected-tag" v-for="option in valueAsArray" v-bind:key="option.index"> <slot v-for="option in valueAsArray" name="selected-option-container"
:option="option" :deselect="deselect">
<span class="selected-tag" v-bind:key="option.index">
<slot name="selected-option" v-bind="option"> <slot name="selected-option" v-bind="option">
{{ getOptionLabel(option) }} {{ getOptionLabel(option) }}
</slot> </slot>
@@ -290,6 +292,7 @@
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
</span> </span>
</slot>
<input <input
ref="search" ref="search"