<ul>
<li @click="getgamelist(1,10)"></li>
<li @click="getgamelist(1,1)">1</li>
<li @click="getgamelist(2,4)">2-4</li>
<li @click="getgamelist(5,6)">5-6</li>
<li @click="getgamelist(7,10)">7</li>
</ul>
with the above structure, you want to add class to the clicked li after click, and delete the corresponding class
.I have searched for relevant solutions, and basically all of them are solved by getting index through v-for.