the existing demand is that you need to create a table with month and amount in it.
because each field is the same, writing 12 identical pieces of data in data feels too redundant. I just want to write a loop and add it to data for rendering after 10 cycles. But there is a problem:
data12;datadom
how to solve the problem of little brothers and sisters ~
//
data() {
return {
monthTableData: {
paymentType:"",
paymentMonth: "",
},
}
}
copyData() {
let list = [];
for (var i =0; i<=5;iPP) {
for (let k in this.monthTableData) {
list.push(this.monthTableData);
}
}
this.monthTableDataNew = list;
},