JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://unpkg.com/[email protected]"></script>
<div id="app">
<select v-model="selected_value">
<template v-for="option in options">
<option
:value="option.id"
:selected="option.id===selected">
{{ option.description }}
</option>
</template>
</select>
<div>Valor: {{ selected_value }}</div>
</div>
JavaScript
var app = new Vue({
el: '#app',
data: {
selected_value: '',
options: [
{ id: 0, description: 'option 001'},
{ id: 1, description: 'option 002'},
{ id: 2, description: 'option 003'}
],
selected: 3
}
})