From cbe02ce9a0747f113f99da4954cbd2612a965ad9 Mon Sep 17 00:00:00 2001 From: Youngster_yj <907985037@qq.com> Date: Mon, 11 Dec 2023 14:49:40 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E9=80=89=E4=B8=AD=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/pages/payloadManager/newPayloadTable.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/app/renderer/src/main/src/pages/payloadManager/newPayloadTable.tsx b/app/renderer/src/main/src/pages/payloadManager/newPayloadTable.tsx index 6b5556aa76..0a4e113a3a 100644 --- a/app/renderer/src/main/src/pages/payloadManager/newPayloadTable.tsx +++ b/app/renderer/src/main/src/pages/payloadManager/newPayloadTable.tsx @@ -591,18 +591,24 @@ export const NewPayloadTable: React.FC = (props) => { setSelectObj({Id: record.Id, dataIndex: column.dataIndex}) } else if (callCountRef.current >= 2) { console.log("Double click:", record, column) - handleRowDoubleClick(record, column) + setEditingObj({Id: record.Id, dataIndex: column.dataIndex}) } callCountRef.current = 0 // 重置计数器 } const handleRowClick = (record, column) => { + if(record.Id===editingObj?.Id&&column.dataIndex===editingObj?.dataIndex){ + return + } + if(record.Id!==editingObj?.Id||column.dataIndex!==editingObj?.dataIndex){ + setEditingObj(undefined) + setSelectObj(undefined) + } callCountRef.current += 1 setTimeout(() => handleMethod(record, column), 200) } const handleRowDoubleClick = (record, column) => { - setSelectObj(undefined) - setEditingObj({Id: record.Id, dataIndex: column.dataIndex}) + } const handleRowRightClick = (record, column) => {