Files
vue-tippy/docs
Konrad Kügler 44b67e46b9 Add support for <Tippy> as a child (issue #123 in 6.x)
Having <Tippy> as a child of an element to tooltip was a nice use-case
in 4.x. See https://github.com/KABBOUCHI/vue-tippy/issues/123.
We re-add this in a similar manner.

Using to="parent" (as a fixed string), one can now use either the main
<Tippy> slot ("default") or its specific "content" slot to specify
the tooltip content.
The tooltip will be triggered on the parent element without
adding a specifc Tippy node to the DOM.

This should provides a non-interfering way to specify tooltips.

Implementation:
For the to="parent" case, we need to find the parent DOM element, but in
the "worst" case <Tippy> won't render any DOM nodes at all, which could
help us to find the parent.
Instead, we initially render a hidden <span> (and the tooltip content).
Using the span as a template ref ('findParentHelper'), we can get the
parent and assign that to the actual 'elem' ref. This will trigger a
re-render, where we can drop the helper <span> again.
2023-07-31 21:28:18 +02:00
..
2021-02-09 23:04:36 +02:00
2021-01-02 23:03:33 +02:00
2020-12-29 19:16:06 +02:00
2020-12-29 19:16:06 +02:00
2021-02-09 23:04:36 +02:00
2021-03-02 18:05:10 +02:00
2020-12-29 19:16:06 +02:00
2021-03-02 18:05:10 +02:00

vue-tippy

Setup

Install dependencies:

yarn install

Development

yarn dev

Static Generation

This will create the dist/ directory for publishing to static hosting:

yarn generate

To preview the static generated app, run yarn start

For detailed explanation on how things work, checkout nuxt/content and @nuxt/content theme docs.