// parent
<nameservers-edit-panel-row
:key="index+selectedNameserversType"
v-model="currentNameservers[index]"
/>
// children
<input class="form-control" v-model="$v.model.$model" />
@Prop({ type: String, required: true }) public value!: string;
public model: string = this.value;
@Watch('model')
public onChangeModel() {
this.$emit('input', this.model);
}
v-model
с компонентамиv-model
на компонентахВторойй вариант
// Parent
<card-country-select v-model="model"/>
// child -> card-country-select
<input @input="onChange">
@Prop({ type: String, required: true }) public value!: string;
public onChange(event: { target: { value: any } }) {
this.$emit('input', event.target.value);
}