From deff8a1cf407a1660db06d5fe51d7b0ccab43a98 Mon Sep 17 00:00:00 2001 From: jorgep Date: Fri, 20 Sep 2024 13:58:26 +0200 Subject: [PATCH] feat: hide menus on small view --- src/components/VnTable/VnTable.vue | 2 +- src/components/common/VnSectionMain.vue | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/VnTable/VnTable.vue b/src/components/VnTable/VnTable.vue index 3e982919b..a3b64d264 100644 --- a/src/components/VnTable/VnTable.vue +++ b/src/components/VnTable/VnTable.vue @@ -147,7 +147,7 @@ onMounted(() => { quasar.platform.is.mobile && !$props.disableOption?.card ? CARD_MODE : $props.defaultMode; - stateStore.rightDrawer = true; + stateStore.rightDrawer = quasar.screen.gt.xs; columnsVisibilitySkipped.value = [ ...splittedColumns.value.columns .filter((c) => c.visible == false) diff --git a/src/components/common/VnSectionMain.vue b/src/components/common/VnSectionMain.vue index 9975b1011..15be6ad9a 100644 --- a/src/components/common/VnSectionMain.vue +++ b/src/components/common/VnSectionMain.vue @@ -2,6 +2,7 @@ import { useStateStore } from 'stores/useStateStore'; import LeftMenu from 'components/LeftMenu.vue'; import { onMounted } from 'vue'; +import { useQuasar } from 'quasar'; const stateStore = useStateStore(); const $props = defineProps({ @@ -10,7 +11,9 @@ const $props = defineProps({ default: true, }, }); -onMounted(() => (stateStore.leftDrawer = $props.leftDrawer)); +onMounted( + () => (stateStore.leftDrawer = useQuasar().screen.gt.xs ? $props.leftDrawer : false) +);