The above picture is how it looks like.
Now, from every input time value, I have to create an array: timeSlots:["600", "1200", "1500"] like so, when submit is clicked.
I know I can data bind each input using v-model, and then when submit is clicked I can loop over them and add them to an array.
But is there a better way to this, especially using v-for ?
For example, if I have like 40 slots, having 40 data variables doesn't look great in the code.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…