Answers for "vue html select option selected not working"

0

vue html select option selected not working

<select v-model="form.selectedItem">
   <option :value="item.id" v-for="(item, index) in items">{{ item.name }}
   </option>
</select>
<script>
declare vue instance as

data() {
 return {
  selectedItem: 2
 }
}
  </script>

https://stackoverflow.com/a/46772357/13779574
Posted by: Guest on September-10-2021

Code answers related to "vue html select option selected not working"

Browse Popular Code Answers by Language