In my opinion, it's a simple question but couldn't make it work after many efforts.
I have an array named as mainList, on every iteration of array, I render input element:
<div class="col-lg-6 col-sm-12 resource-list" v-for="resource in mainList" :key="resource">
<span>{{ resource }}</span>
<div class="quantity-box">
<input
type="number"
step="1"
min="1"
:id="resource"
:name="resource"
v-model="initialValue"
/>
</div>
</div>
where initialValue=0. The Problem I am facing is, whenever I try to change value of one input box, all gets changed. I want to add all the input field having value greater than initialValue to an array and perform some task with that array. How can I do so ? Thanks in advance.
EDIT: When I replace v-model="initialValue" with :value="initialValue", one input selection doesn't change the value of others but don't know how to save them on an array.
This is my data.js file code which I have imported.
export default {
data() {
return {
initialValue: 0,
mainList: [
"Analytices & insights",
"Journey Mangment",
"Segments & Audience",
"Personalised experiences",
"Campaign Orchestration",
"Customer Acquisition"
]
}
}
}
Right now this is how it looks:

Expected Output: I want to save those resource name into an array whose value is greater than 0.