From 1de07ff3ffa5fb77fa972c76f7daf9073f058915 Mon Sep 17 00:00:00 2001 From: JEECG <445654970@qq.com> Date: Tue, 19 Aug 2025 14:03:32 +0800 Subject: [PATCH] =?UTF-8?q?--=20author:liaozhiyang---date:20250813--for:?= =?UTF-8?q?=E3=80=90issues/8690=E3=80=91BasicTable=E7=9A=84rowSelection?= =?UTF-8?q?=E6=96=B0=E5=A2=9EonSelect=E6=96=B9=E6=B3=95=20---?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/Table/src/hooks/useCustomSelection.tsx | 3 +++ jeecgboot-vue3/src/components/Table/src/types/table.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx index 38c6fa7a9..2f9a76d08 100644 --- a/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx +++ b/jeecgboot-vue3/src/components/Table/src/hooks/useCustomSelection.tsx @@ -348,6 +348,9 @@ export function useCustomSelection( onSelectChild(record, checked); updateSelected(record, checked); onSelectParent(record, checked); + // update-begin--author:liaozhiyang---date:20250813---for:【issues/8690】BasicTable的rowSelection新增onSelect方法 + propsRef.value.rowSelection?.onSelect?.(toRaw(record), checked, toRaw(selectedRows.value)); + // update-end--author:liaozhiyang---date:20250813---for:【issues/8690】BasicTable的rowSelection新增onSelect方法 emitChange(); } diff --git a/jeecgboot-vue3/src/components/Table/src/types/table.ts b/jeecgboot-vue3/src/components/Table/src/types/table.ts index 8cc12fb51..5fb6eafca 100644 --- a/jeecgboot-vue3/src/components/Table/src/types/table.ts +++ b/jeecgboot-vue3/src/components/Table/src/types/table.ts @@ -25,7 +25,7 @@ export interface TableRowSelection extends ITableRowSelection { * Callback executed when select/deselect one row * @type Function */ - onSelect?: (record: T, selected: boolean, selectedRows: Object[], nativeEvent: Event) => any; + onSelect?: (record: T, selected: boolean, selectedRows: Object[]) => any; /** * Callback executed when select/deselect all rows