I want two input field with name1 and name2, name1 = Peter, name2= Kitty. But i have not any idea to handle it.
<div v-for="list in item">
<input type="text" id="name" name="name" v-model="name"></>
{{list.name}}
</div>
data() {
return {
item: [{ name: 'Peter' },{ name: 'Kitty' }],
name: ''
}
}
here i want:
input type="text" id="name1" name="name2" v-model="name1"><--Show Peter
input type="text" id="name1" name="name2" v-model="name2"><--Show Kitty