UNPKG

1.45 kBMarkdownView Raw
1## Tooltip
2
3```jsx
4<Tooltip placement="leftTop" overlay="提示文字">
5 <Button>左上</Button>
6</Tooltip>
7```
8
9
10|参数|类型|默认值|说明|
11|---|----|---|------|
12|overlayClassName | string | dh | additional className added to popup overlay |
13|trigger | string[] | ['hover'] | which actions cause tooltip shown. enum of 'hover','click','focus' |
14|mouseEnterDelay | number | 0 | delay time to show when mouse enter.unit: s. |
15|mouseLeaveDelay | number | 0.1 | delay time to hide when mouse leave.unit: s. |
16|overlayStyle | Object | | additional style of overlay node |
17|wrapStyle | Object | | additional style of wrap node |
18|prefixCls | String | kuma-tooltip | prefix class name |
19|onVisibleChange | Function | | call when visible is changed |
20|visible | boolean | | whether tooltip is visible |
21|defaultVisible | boolean | | whether tooltip is visible initially |
22|placement | String 或 Object | | one of ['left','right','top','bottom', 'topLeft', 'topRight', 'bottomLeft','bottomRight'] or alignConfig of [dom-align](https://github.com/yiminghe/dom-align)
23|align | Object: alignConfig of [dom-align](https://github.com/yiminghe/dom-align) | | only valid when placement's type is String. value will be merged into placement's align config. note: can only accept offset and targetOffset overlay React.Element popup content |
24|getTooltipContainer | function | | function returning html node which will act as tooltip contaier |