Vue lets loop label radio and multiple selections highlight?

 <button v-for="(tab,index) in item" @click="choose(index)"  :class="[isActive?classA:classB]">
     {{tab.con}}
 </button>
 data () {
    return {
        item:[
            {con:""},
            {con:""}, 
            {con:""},
            {con:""}
        ],
        classA:"classA",
        classB:"classB",
        isActive:false
    }
  },
  methods:{
      choose(index){
         
          this.isActive=!this.isActive ;
      }
  }

want to highlight both single and multiple selections, and click to cancel the highlight again. Now is it all highlighted by clicking on the whole? How to solve? Do you want the for loop to judge each tag?

Jul.20,2021

use the array to judge. If index is not added to the array when clicked, delete it to determine whether the array contains the current, and then control activeclass


<button v-for="(tab,index) in item" @click="choose(tab)"  :class="[tab.isActive?classA:classB]">
     {{tab.con}}
 </button>
 data () {
    return {
        item:[
            {con:'',isActive:false},
            {con:'',isActive:false}, 
            {con:'',isActive:false},
            {con:'',isActive:false}
        ],
        classA:'classA',
        classB:'classB',
        
    }
  },
  methods:{
      choose(tab){
         
          tab.isActive=!tab.isActive ;
      }
  }
.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3a661-2b759.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3a661-2b759.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?