[Vuejs]-Vuetify stepper simple component wrapper v-on="$listeners" error

0๐Ÿ‘

โœ…

I found a valid soution to my issue.
In my wrapper component, in the script section I needed to add a model object to specify the event name (from default being input to change):

export default {
  name: "vertical-stepper",
  inheritAttrs: false,
  model: {
    prop: "value",
    event: "change",
  },
};
</script>

This refers to Customizing the Component v-model in the docs.

0๐Ÿ‘

v-model is just a syntactic sugar for @input + :value.

From the docs: https://v2.vuejs.org/v2/guide/components.html#Using-v-model-on-Components

<input v-model="searchText">

does the same thing as:

<custom-input
  v-bind:value="searchText"
  v-on:input="searchText = $event"
></custom-input>

Leave a comment