From 2bb94e8e15300509df41a880c6b084a4a9ab1a2c Mon Sep 17 00:00:00 2001 From: RickCole Date: Tue, 26 Apr 2022 13:22:06 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E5=85=88=E9=87=8D=E6=96=B0=E6=81=A2?= =?UTF-8?q?=E5=A4=8D=20e.persisit=20(#4146)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Action.tsx | 2 +- src/utils/handleAction.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/Action.tsx b/src/renderers/Action.tsx index 299783e68..125e8f419 100644 --- a/src/renderers/Action.tsx +++ b/src/renderers/Action.tsx @@ -614,7 +614,7 @@ export class Action extends React.Component { const {onAction, disabled, countDown, env} = this.props; // https://reactjs.org/docs/legacy-event-pooling.html - // e.persist(); // react 17之后去掉 event pooling 了,这个应该没用了 + e.persist(); let onClick = this.props.onClick; if (typeof onClick === 'string') { diff --git a/src/utils/handleAction.ts b/src/utils/handleAction.ts index 3b4b5b961..b32e5de4f 100644 --- a/src/utils/handleAction.ts +++ b/src/utils/handleAction.ts @@ -13,7 +13,7 @@ export default function handleAction( data?: any ) { // https://reactjs.org/docs/legacy-event-pooling.html - // e.persist(); // react 17之后去掉 event pooling 了,这个应该没用了 + e.persist(); const onAction = props.onAction; let onClick: any = action.onClick;