提交 c3096e26 编写于 作者: V Vben

fix(table): fix table check column configuration failure close #391

上级 1d7608ee
......@@ -17,6 +17,7 @@
- 修复 Modal 组件 loadingTip 配置不生效
- 修复后台权限指令不生效
- 确保 progress 进度条正确关闭
- 修复表格勾选列配置失效问题
## 2.1.0 (2021-03-15)
......
......@@ -113,6 +113,7 @@
import { isNullAndUnDef } from '/@/utils/is';
import { getPopupContainer } from '/@/utils';
import { omit } from 'lodash-es';
import type { BasicColumn } from '../../types/table';
......@@ -147,7 +148,7 @@
const { t } = useI18n();
const table = useTableContext();
const defaultRowSelection = table.getRowSelection();
const defaultRowSelection = omit(table.getRowSelection(), 'selectedRowKeys');
let inited = false;
const cachePlainOptions = ref<Options[]>([]);
......
......@@ -16,10 +16,11 @@ export function useRowSelection(
if (!rowSelection) {
return null;
}
return {
selectedRowKeys: unref(selectedRowKeysRef),
hideDefaultSelections: false,
onChange: (selectedRowKeys: string[], selectedRows: any[]) => {
onChange: (selectedRowKeys: string[], selectedRows: Recordable[]) => {
selectedRowKeysRef.value = selectedRowKeys;
selectedRowRef.value = selectedRows;
emit('selection-change', {
......@@ -27,7 +28,7 @@ export function useRowSelection(
rows: selectedRows,
});
},
...rowSelection,
...(rowSelection === undefined ? {} : rowSelection),
};
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册