标签:style button def ros font -name XML [] span
1、vue点击按钮动态添加多个input,并获取输入的值
<template>
<div>
<input type="text" v-for="(item,i) of items" v-model="items[i]" :key="i">
<button @click="onAdd">添加</button>
</div>
</template>
<script>
export default {
data( ){
return {
items: []
}
},
methods : {
onAdd( ){
this.items.push( "" );
}
}
}
</script>
标签:style button def ros font -name XML [] span
原文地址:https://www.cnblogs.com/haishen/p/10254379.html