template:
<view>
<ul>
<li v-for="(item,index) in 3">
<input type="text" v-model="data[index]" style="border:1px solid #ccc;height:50px;margin-top:10px;">
</li>
</ul>
<view>
</view>
<view>
<button @click="clickMe" style="height:30px;line-height:30px;margin-top:20px;">点我试试</button>
</view>
</view>
script
<script>
export default {
data() {
return {
data:[],
}
}
methods: {
clickMe(){
console.log(this.data)
}
}