The table in the element keeps the original check state after updating the data

insert image description here
reserve-selection : Only valid for columns with type=selection, the type is Boolean, if it is true, the previously selected data will be reserved after the data is updated (row-key needs to be specified)

<el-table ref="table" :data="DataList" :row-key="rowKey">
    <el-table-column type="selection" align="center" :reserve-selection="true" />
</el-table>
	
rowKey (row) {
  return row.id;
}

Guess you like

Origin blog.csdn.net/weixin_40639095/article/details/131856934