[Vuejs]-How to wrap a tag that was dynamically added with a component?

0👍

Doesn’t vue slots solve your problem? https://v2.vuejs.org/v2/guide/components-slots.html

It would be like:

<MyTooltip content="some content">
<slot />
</MyTooltip>

And you could dynamically add anything inside the Tooltip.

Leave a comment