You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
1.1 KiB
26 lines
1.1 KiB
9 years ago
|
---
|
||
|
category: Components
|
||
|
chinese: 文字提示
|
||
9 years ago
|
type: Views
|
||
9 years ago
|
english: Tooltip
|
||
|
---
|
||
10 years ago
|
|
||
10 years ago
|
简单的文字提示气泡框。
|
||
10 years ago
|
|
||
10 years ago
|
## 何时使用
|
||
10 years ago
|
|
||
10 years ago
|
鼠标移入则显示提示,移出消失,气泡浮层不承载复杂文本和操作。
|
||
|
|
||
10 years ago
|
可用来代替系统默认的 `title` 提示,提供一个`按钮/文字/操作`的文案解释。
|
||
10 years ago
|
|
||
|
## API
|
||
|
|
||
|
| 参数 | 说明 | 类型 | 默认值 |
|
||
|
|-----------|------------------------------------------|------------|--------|
|
||
9 years ago
|
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | top |
|
||
|
| title | 提示文字 | string/React.Element | 无 |
|
||
9 years ago
|
| getTooltipContainer | 浮层渲染父节点。默认渲染到 body 上 | Function(triggerNode) | () => document.body |
|
||
8 years ago
|
| arrowPointAtCenter | 箭头是否指向目标元素中心,`antd@1.11+` 支持 | Boolean | `false` |
|
||
9 years ago
|
|
||
|
更多 API 可参考:https://github.com/react-component/tooltip
|