Skip to content

Commit

Permalink
✏️ fix: action types fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Oct 29, 2023
1 parent 6119c9d commit 0ad8699
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/ActionGroup/demos/config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default () => {
items={[
{
icon: <CopyOutlined />,
placement: 'bottom',
onClick: () => {
messageApi.info('复制!');
},
Expand Down
8 changes: 5 additions & 3 deletions src/ActionGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import {
RedoOutlined,
UndoOutlined,
} from '@ant-design/icons';
import { ActionIcon, getPrefixCls } from '@ant-design/pro-editor';
import { ActionIcon, ActionIconProps, getPrefixCls } from '@ant-design/pro-editor';
import { Divider, Dropdown, DropdownProps } from 'antd';
import { useStyle } from './style';

export type ActionIconGroupItemType = {
export type ActionIconGroupItemType = ActionIconProps & {
/**
* @description 展示的 icon
*/
Expand Down Expand Up @@ -155,7 +155,9 @@ const ActionGroup = (props: ActionGroupProps) => {
size={size}
{...item}
onClick={() => {
item?.onClick();
if (item?.onClick) {
item?.onClick();
}
onClick(item?.key);
}}
/>
Expand Down

0 comments on commit 0ad8699

Please sign in to comment.