feat: add tooltip aim-center and refine position demo

This commit is contained in:
Justineo
2021-10-18 16:51:32 +08:00
parent 5a45ce11aa
commit 87e976bb7e
4 changed files with 263 additions and 407 deletions

View File

@@ -30,6 +30,7 @@ Use the `trigger` prop to specify when to show/hide the tooltip.
| `open` | `boolean` | `false` | [^open] |
| `target` | `string|Vue|Node` | - | See the [`target` prop](./overlay#props) of thh [`Overlay`](./overlay) component. |
| `position` | `string` | `'top'` | [^position] |
| `aim-center` | `boolean` | `false` | Whether the tooltip arrow always points to the center of the target element. |
| `trigger` | `string` | `'hover'` | [^trigger] |
| `interactive` | `boolean` | `true` | Whether the tooltip content is interactive. When set to `false`, the tooltip will be automatically hidden after the event specified by `trigger` is triggered outside the `target`. |
| `hide-delay` | `number` | `tooltip.hideDelays` | Time (in milliseconds) to wait before hiding the tooltip after the close trigger is triggered. Can be used to prevent the tooltip being immediately closed after pointer leaves the `target` element and before it enters the tooltip itself. |