Element switch how to write the effect when one of the items is selected and the others are changed to unselected?

I would like to ask if one of the switch sliders is true, and the other sliders are all changed into false. Only one item can be selected

.

clipboard.png


traverses the bound tableData manually changes the value.


looking at the situation you described, you want to achieve the radio function of the table.
1elementUI's table has a radio function, which can be used without it.
2 if you think the radio function of the original table is not very good, you really want to achieve this effect by binding the value of each switch (whether the row is the current row selected)

Menu