mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-10 07:52:23 +03:00
add prop
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
:deselect="deselect"
|
||||
:multiple="multiple"
|
||||
:disabled="disabled">
|
||||
<span :key="getOptionKey(option)" class="vs__selected">
|
||||
<span :key="getOptionKey(option)" :class="getSelectedOptionClasses(option)">
|
||||
<slot name="selected-option" v-bind="normalizeOptionForSlot(option)">
|
||||
{{ getOptionLabel(option) }}
|
||||
</slot>
|
||||
@@ -300,6 +300,24 @@
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Adjust the CSS classes applied to selected values.
|
||||
*/
|
||||
getSelectedOptionClasses: {
|
||||
type: Function,
|
||||
/**
|
||||
* Determines the classname for a given selected option. Receives the
|
||||
* option as a parameter should return a valid class binding via a
|
||||
* String, Object, or Array.
|
||||
*
|
||||
* @see https://vuejs.org/v2/guide/class-and-style.html
|
||||
*
|
||||
* @param option {Object|String|Number} An option that has been selected
|
||||
* @return {Array|Object|String} Any valid VueJS class binding format.
|
||||
*/
|
||||
default: option => ['vs__selected']
|
||||
},
|
||||
|
||||
/**
|
||||
* Select the current value if selectOnTab is enabled
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user