/** * @author Hanz * @date 2022/5/25 下午7:16 * @description */ import React from 'react'; import { TooltipProps as RcTooltipProps } from 'rc-tooltip/lib/Tooltip'; export type TooltipPlacement = 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom' | 'bottom-end' | 'bottom-start' | 'left-end' | 'left-start' | 'right-end' | 'right-start' | 'top-end' | 'top-start'; export interface TooltipProps extends Partial> { /** 提示文字 */ title?: React.ReactNode; /** 位置 */ placement?: TooltipPlacement; /** 被遮挡时自动调整位置 */ autoAdjustOverflow?: boolean; /** 渲染容器 */ getPopupContainer?: (triggerNode: HTMLElement) => HTMLElement; /** 子节点 */ children?: React.ReactNode; /** 控制浮层是否显示 */ open?: boolean; /** 跟随光标移动 */ followCursor?: boolean; /** 容器最大宽度 */ maxWidth?: number | string; /** 禁用标志 */ disabled?: boolean; /** 偏移 */ offset?: [number, number]; [name: string]: any; }