diff options
Diffstat (limited to 'packages/frontend/src/directives/tooltip.ts')
| -rw-r--r-- | packages/frontend/src/directives/tooltip.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/frontend/src/directives/tooltip.ts b/packages/frontend/src/directives/tooltip.ts index b1c1b19907..251ce5675f 100644 --- a/packages/frontend/src/directives/tooltip.ts +++ b/packages/frontend/src/directives/tooltip.ts @@ -51,13 +51,15 @@ export default { if (self.text == null) return; const showing = ref(true); - popup(defineAsyncComponent(() => import('@/components/MkTooltip.vue')), { + const { dispose } = popup(defineAsyncComponent(() => import('@/components/MkTooltip.vue')), { showing, text: self.text, asMfm: binding.modifiers.mfm, direction: binding.modifiers.left ? 'left' : binding.modifiers.right ? 'right' : binding.modifiers.top ? 'top' : binding.modifiers.bottom ? 'bottom' : 'top', targetElement: el, - }, {}, 'closed'); + }, { + closed: () => dispose(), + }); self._close = () => { showing.value = false; |