chore: 先重新恢复 e.persisit (#4146)

This commit is contained in:
RickCole 2022-04-26 13:22:06 +08:00 committed by GitHub
parent 34be2b0d8a
commit 2bb94e8e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -614,7 +614,7 @@ export class Action extends React.Component<ActionProps, ActionState> {
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') {

View File

@ -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;