<!-- 表格 -->
<ele-pro-table
ref="table"
row-key="memberId"
:datasource="url"
:selection="showSelection ? selection : []"
@update:selection="onSelectionChange"
:columns="columns"
:where="where"
:scroll="{ x: false }"
:rowSelection="{
onSelect: onSelect,
onSelectAll: onSelectAll,
selectedRowKeys: selectedRowKeys,
onChange: onSelectChange,
type: 'checkbox',
getCheckboxProps: oncheck,
}"
>
data:{
selectionRowsPlus: [],
selectedRowKeys: [],
}
methods:{
oncheck(record) {
return {
defaultChecked: this.selectedRowKeys.includes(record.memberId), // 配置默认勾选的列
};