I will get an array, such as: [1], then 1 corresponds to apple, 2 corresponds to watermelon, and 3 corresponds to durian.
what I can think of for the time being is:
let arr = this.checkboxGroup1
for(let k in arr){
if(arr[k] == 1){
arr[k] = ""
}else if(arr[k] == 2){
....
}
....
}
in fact, my array may have 20 elements. It will be troublesome to write this. Please give me some advice on the simple method
.the final requirement is to get an array of pure fruit to display