use @vueuse/useClickOutside to hide context menu

This commit is contained in:
geoffrey45
2022-10-08 20:05:16 +03:00
committed by Mungai Njoroge
parent a496d68439
commit 4e0837a627
4 changed files with 24 additions and 12 deletions
-8
View File
@@ -53,19 +53,11 @@ import LeftSidebar from "./components/LeftSidebar/index.vue";
const queue = useQStore();
const router = useRouter();
const modal = useModalStore();
const context_store = useContextStore();
const settings = useSettingsStore();
const app_dom = document.getElementById("app") as HTMLElement;
queue.readQueue();
handleShortcuts(useQStore);
app_dom.addEventListener("click", (e) => {
if (context_store.visible) {
context_store.hideContextMenu();
}
});
router.afterEach(() => {
(document.getElementById("acontent") as HTMLElement).scrollTo(0, 0);
});