mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-19 09:50:33 +03:00
add prop
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
:deselect="deselect"
|
:deselect="deselect"
|
||||||
:multiple="multiple"
|
:multiple="multiple"
|
||||||
:disabled="disabled">
|
:disabled="disabled">
|
||||||
<span :key="getOptionKey(option)" class="vs__selected">
|
<span :key="getOptionKey(option)" :class="getSelectedOptionClasses(option)">
|
||||||
<slot name="selected-option" v-bind="normalizeOptionForSlot(option)">
|
<slot name="selected-option" v-bind="normalizeOptionForSlot(option)">
|
||||||
{{ getOptionLabel(option) }}
|
{{ getOptionLabel(option) }}
|
||||||
</slot>
|
</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
|
* Select the current value if selectOnTab is enabled
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user