diff --git a/packages/floating-vue/src/directives/v-tooltip.ts b/packages/floating-vue/src/directives/v-tooltip.ts index 667257a3..20468035 100644 --- a/packages/floating-vue/src/directives/v-tooltip.ts +++ b/packages/floating-vue/src/directives/v-tooltip.ts @@ -40,12 +40,14 @@ export function getOptions (el, value, modifiers) { } interface Directive { + id: number options: Ref shown: Ref } let directiveApp: App let directives: Ref +let uid = 0 function ensureDirectiveApp () { if (directiveApp) return @@ -64,6 +66,7 @@ function ensureDirectiveApp () { return h(TooltipDirective, { ...directive.options, shown: directive.shown.value || directive.options.shown, + key: directive.id, }) }) }, @@ -83,6 +86,7 @@ export function createTooltip (el, value, modifiers) { const shown = ref(false) const item = { + id: uid++, options, shown, }