import type { TooltipProps } from 'antd'; import type { HTMLAttributes } from 'react'; export type EllipsisDirection = 'start' | 'end' | 'middle'; export interface EllipsisProps extends Omit, 'children'> { /** * 文本内容 */ content: string; /** * 收起操作的文案 * @default '' */ collapseText?: React.ReactNode; /** * 展开操作的文案 * @default '' */ expandText?: React.ReactNode; /** * 省略位置 * @default 'end' */ direction?: EllipsisDirection; /** * 点击文本内容时触发 */ onContentClick?: HTMLAttributes['onClick']; /** * 展示几行 * @default 1 */ rows?: number; /** * 是否默认展开 * @default false */ defaultExpanded?: boolean; } export interface EllipsisTooltipProps extends Omit, Pick { }