From b03223e8cf331121fe34d468c5be6fe2eb03aab5 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Thu, 20 Jun 2024 14:21:39 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=BD=93=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/src/Table.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/components/Table/src/Table.vue b/src/components/Table/src/Table.vue index ba06a3cce..64bd16734 100644 --- a/src/components/Table/src/Table.vue +++ b/src/components/Table/src/Table.vue @@ -136,11 +136,9 @@ export default defineComponent({ const toggleAllSelection = (isAll)=>{ if(isAll){ //全选 - if(elTableRef.value?.getSelectionRows().length{ - elTableRef.value!.toggleRowSelection(row,true) - }) - } + unref(getProps).data.forEach(row=>{ + elTableRef.value!.toggleRowSelection(row,true) + }) } }