el-table多选分页保留
# el-table多选分页保留
参数 | 说明 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|
row-key | 行数据的 Key,用来优化 Table 的渲染;在使用 reserve-selection 功能与显示树形数据时,该属性是必填的。类型为 String 时,支持多层访问:user.info.id,但不支持 user.info[0].id,此种情况请使用 Function。 | Function(row)/String | - | - |
selection-change | 当选择项发生变化时会触发该事件 | selection | - | - |
reserve-selection | 仅对 type=selection 的列有效,类型为 Boolean,为 true 则会在数据更新之后保留之前选中的数据(需指定 row-key) | Boolean | -- | false |
<el-table
v-loading="isTableLoading"
:data="tableResponse.content"
style="width: 100%"
class="wz-table-del-line"
:row-key="(row)=>{return row.id}"
@selection-change="handleSelectionChange"
>
<el-table-column
type="selection"
width="55"
:reserve-selection="true"
/>
</el-table>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
上次更新: 10/21/2021, 1:52:09 PM