mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-01-23 11:50:20 +08:00
fix(table): fix table check column configuration failure close #391
This commit is contained in:
parent
1d7608ee40
commit
c3096e26ff
@ -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),
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user