code is as follows. The problem is that every time I type in the input box, the input box automatically loses focus.
ps: implements the function that every time you click the add button, an object is added to the name array of list objects, and a new input, is generated. You will encounter the above problem in this input input
<div class="addTags" v-for="(item,index) in list.name" :key="item.data">
<input type="text" v-model="item.data">
</div>
<span class="add" @click="addData()">+</span>
data() {
return: {
list: {
name: []
}
}
},
methods: {
addData() {
this.list.name.push({data:""})
}
}