用element-ui中的table时,当有多选又有翻页功能时,点击翻页后之前选中的数据会丢失,怎么使表格具有记忆功能呢
element-ui API中有几个属性可以供我们完美解决这个问题
1.单元格的属性和方法:

2.表格的方法:

javascript
<el-table v-if="dialogType == 0" ref="multipleTable" :data="dialogData" max-height="500px"
@selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" show-overflow-tooltip :reserve-selection="true"></el-table-column>
<el-table-column prop="name" align="center" label="账号" show-overflow-tooltip></el-table-column>
</el-table>
data() {
return {
getRowKeys(row) {
return row.userid;
},
}