import { CSSProperties, ReactNode } from 'react'; export interface ProTooltipType { /** * 提示文本内容 * @description 支持字符串或React节点 * @default undefined */ text?: string | ReactNode; /** * 提示框宽度 * @description 设置提示框的宽度,支持各种CSS宽度单位 */ width?: string | number; /** * 显示的行数 * @description 当内容超过设定行数时将截断显示 * @default 1 */ line?: number; /** * 是否跟随父元素滚动 * @description 启用后,提示框将跟随父元素滚动 * @default true */ scrollFollowParent?: boolean; /** * 自定义类名 * @description 额外的CSS类名 * @default '' */ className?: string; /** * 子元素 * @description 组件包裹的内容 * @default null */ children?: ReactNode; /** * 自定义样式对象 * @description 直接应用于组件的内联样式 * @default {} */ style?: CSSProperties; /** * 兼容属性 * @description 支持传入其他属性 */ [key: string]: any; } export interface ProTooltipRefObjectType { /** 当前引用的DOM元素 */ readonly current: T | null; } export type ProTooltipTriggerNodeType = HTMLElement & { /** 父节点元素 */ parentNode: HTMLElement; };