[Vuejs]-Taking enum values from model to component

0👍

You can’t set :value="task.priority" because task.priority is an array. You should pick up one of values (low, medium or high). Here is how I work with select:

<select name="name" class="form-control" v-model="field">
    <option v-for="option in param.options" :value="option.value">{{$t(option.option)}}</option>
</select>

As you can see I store the value of my select into field data property. Also you cat check docs about working with select https://v2.vuejs.org/v2/guide/forms.html#Select .

Leave a comment