.active {
background: red;
}
data: () => ({
val: -Infinity,
...
}),
methods: {
onClick() {
this.val = Math.min(...this.arr.filter(n => n > this.val));
},
...
},
<div v-for="n in arr" :class="{ active: n <= val }">{{ n }}</div>
<button @click="onClick">click me</button>