[Vuejs]-How to pass value to v-model with emit?

4👍

You should emit an event with name input :


@input="$emit('input', $event.target.value)"

-1👍

I solved it as follows

methods: {
  changeSelect: function () {
    this.$emit('input', this.modelValue);
  },
},
<template>
    <div>
        <v-select
            :label="label"
            @input="changeSelect()"
            v-model="modelValue"
            :items="items"
        ></v-select>
        <p>{{ modelValue }}</p>
    </div>
</template>

Leave a comment