/** * @file 气泡卡片 */ import { PopoverProps as PopoverPropsAntd } from 'antd/lib/popover'; import { CSSProperties, FC, ReactNode } from 'react'; import './index.less'; export interface PopoverProps { /** * 标题 */ title?: ReactNode; /** * 子标题,必须与 title 一起使用 */ subtitle?: string; /** * 内容 */ content?: ReactNode; /** * 触发动作, 默认 hover */ trigger?: 'hover' | 'click' | 'focus'; /** * 是否隐藏 header 与 body 之间的分隔线,默认 false */ hideSeparator?: boolean; /** * 自定义样式 */ style?: CSSProperties; /** * 自定义内容区样式 */ contentStyle?: CSSProperties; /** * 弹出位置 */ placement?: PopoverPropsAntd['placement']; /** * 调整相对位置, see https://github.com/yiminghe/dom-align */ align?: PopoverPropsAntd['align']; /** * 添加额外的 classname */ className?: string; /** * 关闭后是否销毁 */ destroyTooltipOnHide?: boolean; /** * visible 受控模式 */ visible?: PopoverPropsAntd['visible']; /** * visible 变化时的 callback */ onVisibleChange?: PopoverPropsAntd['onVisibleChange']; /** * 浮层渲染父节点,默认渲染到 body 上 */ getPopupContainer?: PopoverPropsAntd['getPopupContainer']; children?: ReactNode; } export declare const Popover: FC;