[Vuejs]-Setting v-select default value with if conditions

1👍

This is wrong

  <v-select 
    :items:"items"
    v-model:"select"
  ></v-select>

should be

  <v-select 
    :items="items"
    v-model="select"
  ></v-select>

and

watch: {
    select(value) {  // instead of selected
      localStorage.setItem('select', value);
      console.log(localStorage.getItem('select'));
    },
}

Also, this.users is not defined and should throw an js exception.

Leave a comment