From c1475082ee373518cbe4e8a49cffedf48c0f0dff Mon Sep 17 00:00:00 2001 From: zhangdaiscott Date: Mon, 19 Jun 2023 17:57:37 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90issues/503=E3=80=91table=E8=A1=8C?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E6=97=B6=E5=8D=A1=E9=A1=BF=E6=98=8E=E6=98=BE?= =?UTF-8?q?=20#503?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Table/src/hooks/useRowSelection.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/components/Table/src/hooks/useRowSelection.ts b/src/components/Table/src/hooks/useRowSelection.ts index dc0d2f2..c9ee5e2 100644 --- a/src/components/Table/src/hooks/useRowSelection.ts +++ b/src/components/Table/src/hooks/useRowSelection.ts @@ -44,10 +44,15 @@ export function useRowSelection(propsRef: ComputedRef, tableDat const { onChange } = rowSelection; if (onChange && isFunction(onChange)) onChange(getSelectRowKeys(), getSelectRows()); } - emit('selection-change', { - keys: getSelectRowKeys(), - rows: getSelectRows(), - }); + //update-begin---author:scott ---date:2023-06-19 for:【issues/503】table行选择时卡顿明显 #503--- + //table行选择时卡顿明显 #503 + if (unref(tableData).length > 0) { + emit('selection-change', { + keys: getSelectRowKeys(), + rows: getSelectRows(), + }); + } + //update-end---author:scott ---date::2023-06-19 for:【issues/503】table行选择时卡顿明显 #503--- }); }, { deep: true }