Use globalThis instead of window (S7764)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 00:30:33 +08:00
co-authored by Claude Opus 4.6
parent ebd198e28d
commit 5d143d4cc3
8 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -928,7 +928,7 @@ const handleWindowClick = (e) => {
onMounted(async () => {
isLoading.value = true;
await store.fetchAllFiles();
window.addEventListener("click", handleWindowClick);
globalThis.addEventListener("click", handleWindowClick);
// Add the .scrollbar class to the DataTable tbody
const tbodyElement = document.querySelector(".p-datatable-tbody");
tbodyElement?.classList.add("scrollbar");
@@ -936,7 +936,7 @@ onMounted(async () => {
});
onBeforeUnmount(() => {
window.removeEventListener("click", handleWindowClick);
globalThis.removeEventListener("click", handleWindowClick);
});
</script>
<style scoped>