refactor(client): refactor

This commit is contained in:
syuilo
2021-12-23 17:05:26 +09:00
parent cc441258db
commit 3a990dce75
3 changed files with 28 additions and 65 deletions

View File

@ -18,6 +18,9 @@ export function useTooltip(
const open = () => {
close();
if (!isHovering) return;
if (elRef.value == null) return;
const el = elRef.value instanceof Element ? elRef.value : elRef.value.$el;
if (!document.body.contains(el)) return; // openしようとしたときに既に元要素がDOMから消えている場合があるため
const showing = ref(true);
onShow(showing);