mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix: Add missing tooltip-zIndex (#30432)
* fix: Add missing tooltip-zIndex * docs: Update docs
This commit is contained in:
parent
8e76c1c5ae
commit
11b7676557
@ -13,4 +13,14 @@ describe('Tooltip.typescript', () => {
|
||||
expect(tooltip).toBeTruthy();
|
||||
expect(tooltip2).toBeTruthy();
|
||||
});
|
||||
|
||||
it('Tooltip support zIndex', () => {
|
||||
const tooltip = (
|
||||
<Tooltip title="title" zIndex={999}>
|
||||
<div />
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
expect(tooltip).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
@ -38,6 +38,7 @@ The following APIs are shared by Tooltip, Popconfirm, Popover.
|
||||
| placement | The position of the tooltip relative to the target, which can be one of `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` | |
|
||||
| trigger | Tooltip trigger mode. Could be multiple by passing an array | `hover` \| `focus` \| `click` \| `contextMenu` \| Array<string> | `hover` | |
|
||||
| visible | Whether the floating tooltip card is visible or not | boolean | false | |
|
||||
| zIndex | Config `z-index` of Tooltip | number | - | |
|
||||
| onVisibleChange | Callback executed when visibility of the tooltip card is changed | (visible) => void | - | |
|
||||
|
||||
## Note
|
||||
|
@ -40,6 +40,7 @@ cover: https://gw.alipayobjects.com/zos/alicdn/Vyyeu8jq2/Tooltp.svg
|
||||
| placement | 气泡框位置,可选 `top` `left` `right` `bottom` `topLeft` `topRight` `bottomLeft` `bottomRight` `leftTop` `leftBottom` `rightTop` `rightBottom` | string | `top` | |
|
||||
| trigger | 触发行为,可选 `hover` \| `focus` \| `click` \| `contextMenu`,可使用数组设置多个触发行为 | string \| string\[] | `hover` | |
|
||||
| visible | 用于手动控制浮层显隐 | boolean | false | |
|
||||
| zIndex | 设置 Tooltip 的 `z-index` | number | - | |
|
||||
| onVisibleChange | 显示隐藏的回调 | (visible) => void | - | |
|
||||
|
||||
## 注意
|
||||
|
@ -141,7 +141,7 @@
|
||||
"rc-table": "~7.13.0",
|
||||
"rc-tabs": "~11.7.0",
|
||||
"rc-textarea": "~0.3.0",
|
||||
"rc-tooltip": "~5.1.0",
|
||||
"rc-tooltip": "~5.1.1",
|
||||
"rc-tree": "~4.1.0",
|
||||
"rc-tree-select": "~4.3.0",
|
||||
"rc-trigger": "^5.2.1",
|
||||
|
Loading…
Reference in New Issue
Block a user