From 4e4fa2a811df2dde4025314259d5ef5e2ec7dfc6 Mon Sep 17 00:00:00 2001 From: xuliangzhan Date: Wed, 16 Oct 2024 15:00:04 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E4=BF=AE=E5=A4=8D=E5=A4=8D=E9=80=89?= =?UTF-8?q?=E6=A1=86=E5=8B=BE=E9=80=89=E6=97=A0=E6=95=88=E9=97=AE=E9=A2=98?= =?UTF-8?q?=20#2601?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/views/table/TableTest9.vue | 105 ++++++++++------------------ packages/table/src/table.ts | 4 +- 2 files changed, 38 insertions(+), 71 deletions(-) diff --git a/examples/views/table/TableTest9.vue b/examples/views/table/TableTest9.vue index a205e948d1..1a95c9cd59 100644 --- a/examples/views/table/TableTest9.vue +++ b/examples/views/table/TableTest9.vue @@ -1,81 +1,48 @@ diff --git a/packages/table/src/table.ts b/packages/table/src/table.ts index b4ec21e587..7bef693086 100644 --- a/packages/table/src/table.ts +++ b/packages/table/src/table.ts @@ -5732,7 +5732,6 @@ export default defineComponent({ handleBatchSelectRows (rows, value, isForce) { const { treeConfig } = props const { selectCheckboxMaps } = reactData - const selectRowMaps = Object.assign({}, selectCheckboxMaps) const checkboxOpts = computeCheckboxOpts.value const { checkField, checkStrictly, checkMethod } = checkboxOpts if (checkField) { @@ -5754,6 +5753,7 @@ export default defineComponent({ tablePrivateMethods.handleSelectRow({ row }, value, isForce) }) } else { + const selectRowMaps = Object.assign({}, selectCheckboxMaps) rows.forEach(row => { const rowid = getRowid($xeTable, row) if (isForce || (!checkMethod || checkMethod({ row }))) { @@ -5769,9 +5769,9 @@ export default defineComponent({ handleCheckboxReserveRow(row, value) } }) + reactData.selectCheckboxMaps = selectRowMaps } } - reactData.selectCheckboxMaps = selectRowMaps }, /** * 单行