In my vue application I've got lots and lots of input fields (example):
<div class="field">
<label for="name" class="label">Naam</label>
<div class="control">
<input id="name"
name="name"
type="text"
v-model="relation.name"
class="input"
:class="{ 'is-danger': errorsHas('name') }"
autofocus>
<p class="help is-danger" v-if="errorsHas('name')">{{ error('name') }}</p>
</div>
</div>
So I would like to wrap this in a input component. But since vue 1 the .sync method is gone so how would I do this? Firing events is not realy a solution I guess. Just wondering how to solve this?
I would like to have something like this:
<custom-input v-model=relation.name></custom-input>
And everything else (class name, autofocus etc...) must be handled in that component.
Is this possible?