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 }, /** * 单行