<tr v-for="item in tableData">
<td :class="same">{{item.td}}</td>
</tr>
computed:{
same(){
let arr = ???.push("c");
return{
red: arr == ["a","c"]
}
}
}
here? It should be the data of item.td. How to write it? It"s not very scientific to use the native JS method to traverse the tableData.