From 0f1a4eeb96dcc1cf72a3eb6317ca2272e3825a11 Mon Sep 17 00:00:00 2001 From: wzc520pyfm <1528857653@qq.com> Date: Fri, 6 Dec 2024 08:54:53 +0800 Subject: [PATCH] feat(ui): [action] support e param for on-click --- packages/ui/src/Action/Item.tsx | 10 ++++---- packages/ui/src/Action/index.md | 42 ++++++++++++++++----------------- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/ui/src/Action/Item.tsx b/packages/ui/src/Action/Item.tsx index 31f87e37b..cfe3280c6 100644 --- a/packages/ui/src/Action/Item.tsx +++ b/packages/ui/src/Action/Item.tsx @@ -8,7 +8,7 @@ export interface BaseProps extends ButtonProps { visible?: boolean; /** 固定展示、不会被折叠 */ fixed?: boolean; - onClick?: () => Promise | void; + onClick?: (e: React.MouseEvent) => Promise | void; children?: React.ReactElement | string; enableLoading?: boolean; tooltip?: string; @@ -26,8 +26,8 @@ export class ActionButton extends React.PureComponent {