Browse Source

tiny refactoring (PR feedback)

pull/5114/head
Daniel Spaude 2 years ago
parent
commit
759ee66e92
No known key found for this signature in database
GPG Key ID: 654A3D1FA4F35FFE
  1. 8
      packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

8
packages/nc-gui/pages/[projectType]/[projectId]/index/index.vue

@ -10,8 +10,6 @@ const { isLoading, isMobileMode } = useGlobal()
provide(TabMetaInj, activeTab) provide(TabMetaInj, activeTab)
const mainArea = ref<HTMLDivElement>()
const icon = (tab: TabItem) => { const icon = (tab: TabItem) => {
switch (tab.type) { switch (tab.type) {
case TabType.TABLE: case TabType.TABLE:
@ -34,10 +32,6 @@ const hideSidebarOnClickOrTouchIfMobileMode = () => {
toggle(false) toggle(false)
} }
} }
onMounted(() => {
mainArea.value?.addEventListener('click', hideSidebarOnClickOrTouchIfMobileMode)
})
</script> </script>
<template> <template>
@ -94,7 +88,7 @@ onMounted(() => {
<LazyGeneralFullScreen v-if="!isMobileMode" class="nc-fullscreen-icon mb-1px" /> <LazyGeneralFullScreen v-if="!isMobileMode" class="nc-fullscreen-icon mb-1px" />
</div> </div>
<div ref="mainArea" class="w-full min-h-[300px] flex-auto"> <div class="w-full min-h-[300px] flex-auto" @click="hideSidebarOnClickOrTouchIfMobileMode">
<NuxtPage :page-key="`${$route.params.projectId}.${$route.name}`" /> <NuxtPage :page-key="`${$route.params.projectId}.${$route.name}`" />
</div> </div>
</div> </div>

Loading…
Cancel
Save