I am trying to have the selectedOption as default. But its not working… I also tried to do a const selectedOption = ‘Select an option’ but that does not work either. I can see the tag but it’s empty. What am I doing wrong?
<template>
<select v-model="selectedOption" class="">
<option v-for="option in options" :value="option.value">
{{ option.text }}
</option>
</select>
</template>
const options = ref([
{
selectedOption: 'Select an option',
},
{
value: 'option1', text: 'Option 1'
},
{
value: 'option2', text: 'Option 2'
}
])