Ich versuche, eine ausgewählte Gruppe in Vue zu machen.Wie setze ich optgroup select label in Vue.js?
Fiddle: https://jsfiddle.net/Tropicalista/vwjxc5dq/
ich das versucht habe:
<optgroup v-for="option in options" v-bind:label="option">
<option v-for="sub in option" v-bind:value="option.value">
{{ sub.text }}
</option>
</optgroup>
Meine Daten:
data: {
selected: 'A',
options: {
First: [
{ text: 'One', value: 'A' },
{ text: 'Two', value: 'B' }
],
Second: [
{ text: 'Three', value: 'C' }
]
}
}