How does the cell click event of elementui el-table locate to the specified cell?

I want to click on a specified cell in el-table to execute a method. I use the @ cell-click method to get the four parameters row, column, cell, event, but how can I tell if the cell being clicked is the one I specified? Now that I click on any cell, I will execute that method, and I can"t tell which cell I clicked.

Feb.24,2022

you said it all

Click a specified cell in el-table to execute a method. I use the @ cell-click method to get the four parameters row, column, cell, event

row , column rows and columns are all obtained, which confirms this cell. Why can't you tell the difference?


row is the data of this row. You can use indexOf to get the index


I don't know what you want to do to get the data of the clicked cells.

cellClick(row, column, cell, event){
  alert(row[column.property])
}
Menu