-1π
I think v-model
should work fine instead of :value
but havenβt had time to test ist yet.
// Child HTML
<input
type="text"
placeholder="regular child"
v-model="valueRegularChild"
@input="inputRegularChild"
>
<p>{{ regularInputValue }}</p>
<v-textarea
type="text"
placeholder="vuetify child"
v-model="valueVuetifyChild"
@input="inputVuetifyChild"
></v-textarea>
<p>{{ vuetifyInputValue }}</p>
// Child β methods
inputVuetifyChild($event) {
this.$emit('msgVuetify', this.vuetifyInputValue);
},
inputRegularChild($event) {
this.$emit('msgRegular', this.regularInputValue);
},
// parent HTML
<child-component
:valueVuetifyChild="insideParentVuetify"
:valueRegularChild="insideParentRegular"
@msgVuetify="insideParentVuetify = $event"
@msgRegular="insideParentRegular = $event"
>
<child-component>
- [Vuejs]-Is v-bind called when referencing a component in Vue?
- [Vuejs]-How to disable v-if compilation caching when condition is truthy again?
Source:stackexchange.com