import { default as React } from 'react'; import { DropdownProps as AntDropdownProps } from 'antd'; import { BaseComponentProps, DataSetConfig } from '../../types/common'; interface MenuItem { key: string; label: string; icon?: string; disabled?: boolean; danger?: boolean; divider?: boolean; children?: MenuItem[]; } /** 与 Ant Design Dropdown/Menu 事件对应的 command 动作名,用于 Extend 中 createWatchCommands 注册 */ export interface AndDropdownActionProps { /** 点击菜单项(Menu onClick) */ clickAction?: string; /** 菜单项被选中(Menu onSelect,selectable 时) */ selectAction?: string; /** 菜单项取消选中(Menu onDeselect,multiple 时) */ deselectAction?: string; /** 下拉框显示/隐藏(Dropdown onOpenChange) */ openChangeAction?: string; } export interface AndDropdownProps extends Omit, BaseComponentProps, DataSetConfig, AndDropdownActionProps { /** 按钮文本 */ text?: string; /** 菜单项配置 */ items?: MenuItem[] | string; /** 子元素 */ children?: React.ReactNode; /** (Internal) 是否有 GrapesJS 子组件 */ hasChildren?: boolean; /** 直接透传:下拉框显示状态变化 */ onOpenChange?: (open: boolean, info: { source: 'trigger' | 'menu'; }) => void; /** 迭代器内当前行序号,供 clickAction/selectAction 等使用 @index 占位符(与 AndSelect 一致) */ index?: number; } export declare const AndDropdown: React.FC; export default AndDropdown; //# sourceMappingURL=index.d.ts.map