From 999e0f570d224eb7929bf5d4b411ce651026247d Mon Sep 17 00:00:00 2001 From: liaoxuezhi Date: Tue, 25 Jun 2019 11:10:53 +0800 Subject: [PATCH] =?UTF-8?q?Action=20=E6=94=AF=E6=8C=81=20onClick=20?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/renderers/Action.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderers/Action.tsx b/src/renderers/Action.tsx index 09d69456..bc9a3a12 100644 --- a/src/renderers/Action.tsx +++ b/src/renderers/Action.tsx @@ -53,7 +53,7 @@ export interface ActionProps { level?: 'info' | 'success' | 'warning' | 'danger' | 'link'; onAction?: (e: React.MouseEvent | void | null, action: object) => void; isCurrentUrl?: (link: string) => boolean; - onClick?: (e: React.MouseEvent) => void; + onClick?: (e: React.MouseEvent, props:any) => void; primary?: boolean; activeClassName: string; componentClass: React.ReactType; @@ -88,7 +88,7 @@ export class Action extends React.Component { handleAction(e: React.MouseEvent) { const {onAction, onClick, disabled} = this.props; - onClick && onClick(e); + onClick && onClick(e, this.props); if (disabled || e.isDefaultPrevented() || !onAction) { return;