mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-22 18:07:31 -07:00
fix: hide tooltip on page change
This commit is contained in:
parent
8758ab50e7
commit
49acade942
1 changed files with 4 additions and 0 deletions
|
@ -4,6 +4,8 @@
|
||||||
import { defineAsyncComponent, Directive, ref } from "vue";
|
import { defineAsyncComponent, Directive, ref } from "vue";
|
||||||
import { isTouchUsing } from "@/scripts/touch";
|
import { isTouchUsing } from "@/scripts/touch";
|
||||||
import { popup, alert } from "@/os";
|
import { popup, alert } from "@/os";
|
||||||
|
import { mainRouter } from "@/router";
|
||||||
|
|
||||||
|
|
||||||
const start = isTouchUsing ? "touchstart" : "mouseover";
|
const start = isTouchUsing ? "touchstart" : "mouseover";
|
||||||
const end = isTouchUsing ? "touchend" : "mouseleave";
|
const end = isTouchUsing ? "touchend" : "mouseleave";
|
||||||
|
@ -99,6 +101,8 @@ export default {
|
||||||
el.addEventListener(end, hideTooltip, { passive: true });
|
el.addEventListener(end, hideTooltip, { passive: true });
|
||||||
el.addEventListener("focusout", hideTooltip, { passive: true });
|
el.addEventListener("focusout", hideTooltip, { passive: true });
|
||||||
|
|
||||||
|
mainRouter.on("change", hideTooltip);
|
||||||
|
|
||||||
el.addEventListener("click", () => {
|
el.addEventListener("click", () => {
|
||||||
window.clearTimeout(self.showTimer);
|
window.clearTimeout(self.showTimer);
|
||||||
self.close();
|
self.close();
|
||||||
|
|
Loading…
Reference in a new issue