diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-30 23:51:18 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2022-06-30 23:51:18 +0900 |
| commit | 7c7ce072c733ef47a40e6bd72dd154d29715a9cf (patch) | |
| tree | 7081f6c11c388504dcb9030855a13a0e8c44362e /packages/client/src/scripts/use-tooltip.ts | |
| parent | feat(client): add rss-marquee widget (diff) | |
| download | sharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.tar.gz sharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.tar.bz2 sharkey-7c7ce072c733ef47a40e6bd72dd154d29715a9cf.zip | |
chore(client): tweak ui
Diffstat (limited to 'packages/client/src/scripts/use-tooltip.ts')
| -rw-r--r-- | packages/client/src/scripts/use-tooltip.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/client/src/scripts/use-tooltip.ts b/packages/client/src/scripts/use-tooltip.ts index bc8f27a038..1f6e0fb6ce 100644 --- a/packages/client/src/scripts/use-tooltip.ts +++ b/packages/client/src/scripts/use-tooltip.ts @@ -3,6 +3,7 @@ import { Ref, ref, watch, onUnmounted } from 'vue'; export function useTooltip( elRef: Ref<HTMLElement | { $el: HTMLElement } | null | undefined>, onShow: (showing: Ref<boolean>) => void, + delay = 300, ): void { let isHovering = false; @@ -40,7 +41,7 @@ export function useTooltip( if (isHovering) return; if (shouldIgnoreMouseover) return; isHovering = true; - timeoutId = window.setTimeout(open, 300); + timeoutId = window.setTimeout(open, delay); }; const onMouseleave = () => { @@ -54,7 +55,7 @@ export function useTooltip( shouldIgnoreMouseover = true; if (isHovering) return; isHovering = true; - timeoutId = window.setTimeout(open, 300); + timeoutId = window.setTimeout(open, delay); }; const onTouchend = () => { |