import React, { FC } from 'react'; import { DropdownProps, MenuProps } from 'antd'; interface BaseDropdownProps { /** 下拉框箭头是否显示 */ arrow?: boolean; /** 下拉menu配置,详细配置请参考Menu文档 */ menuOptions?: MenuProps; /** 下拉根元素的类名称 */ overlayClassName?: string; /** 下拉根元素的样式 */ overlayStyle?: React.CSSProperties; /** 下拉元素样式 */ triggerStyle?: React.CSSProperties; /** 菜单是否禁用 */ disabled?: boolean; /** 设置下拉触发为图标 */ icon?: React.ReactNode; /** 设置下拉触发为working状态 */ working?: boolean; /** 关闭后是否销毁 Dropdown */ destroyPopupOnHide?: boolean; /** 菜单渲染父节点。默认渲染到 body 上,如果你遇到菜单滚动定位问题,试试修改为滚动的区域,并相对其定位。 */ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; /** 菜单弹出位置 */ placement?: 'bottom' | 'bottomLeft' | 'bottomRight' | 'top' | 'topLeft' | 'topRight'; /** 触发下拉的行为, 移动端不支持 hover */ trigger?: Array<'click' | 'hover' | 'contextMenu'>; /** 菜单是否显示 */ visible?: boolean; /** 菜单显示状态改变时调用,参数为 visible。点击菜单按钮导致的消失不会触发 */ onVisibleChange?: (visible: boolean) => void; } export type ItemType = Required['items'][number]; export type FRCDropdownProps = BaseDropdownProps & Omit; export declare const Dropdown: FC; export default Dropdown;