I would like to update some input fields
so I created an input element:
new Vue({
el: '#app',
data: {
record: {
email: 'example@email.com'
},
editing: {
form: {}
}
}
})
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.5.17/vue.js"></script>
<div id="app">
<input type="text" :value="record.email" v-model="editing.form.email">
<pre>{{ editing.form.email }}</pre>
</div>
In this input element I added :value
attr and a v-model
Unfortunately I get an error:
conflicts with v-model on the same element because the latter already expands to a value binding internally
What is the best solution to fill the input field with data and then update it?
I also tried to add :name="..." instead of :value="..."