Tooltip 用于显示补充信息,当鼠标悬停或获得焦点时显示。
元素 + Hover 触发。
Hover 按钮查看不同方向的 Tooltip。
可自定义宽度,Hover 按钮查看不同方向的 Tooltip。
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
|---|---|---|---|---|
| content | 提示内容 | string | - | 'Tooltip text' |
| direction | 提示方向 | string | 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right' | 'top' |
| trigger | 触发元素 | HTMLElement | string | - | null |
| type | 样式类型 | string | 'default' | 'rich' | 'default' |
| title | 标题(仅 rich 类型) | string | - | '' |
| width | 固定宽度(仅 rich 类型) | number | string | - | 'auto' |