From 496c5fa80b4cf191b605e4ef13c7aebc2a16bb7b Mon Sep 17 00:00:00 2001 From: mehm8128 Date: Sun, 5 Nov 2023 17:58:43 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=8A=E3=83=93=E3=82=B2=E3=83=BC=E3=82=B7?= =?UTF-8?q?=E3=83=A7=E3=83=B3=E3=83=90=E3=83=BC=E3=82=92=E3=81=84=E3=81=84?= =?UTF-8?q?=E6=84=9F=E3=81=98=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 47 ++++++++++++++++++++++++-- src/components/Layout/PageHeader.vue | 50 ++++++++++++++++++++-------- src/styles/z-index.scss | 4 +++ 3 files changed, 84 insertions(+), 17 deletions(-) create mode 100644 src/styles/z-index.scss diff --git a/src/App.vue b/src/App.vue index 0324a142..34cb2db4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,12 +2,38 @@ import NavigationBar from '/@/components/NavigationBar/NavigationBar.vue' import PageHeader from '/@/components/Layout/PageHeader.vue' import Loading from '/@/pages/Loading.vue' +import { useResponsiveStore } from '/@/store/responsive' +import { computed, ref, watch } from 'vue' +import { storeToRefs } from 'pinia' +import { useRoute } from 'vue-router' + +const route = useRoute() +const { isMobile } = storeToRefs(useResponsiveStore()) + +const isOpenNavigationBar = ref(!isMobile.value) +const showCover = computed(() => isMobile.value && isOpenNavigationBar.value) + +watch( + () => route.fullPath, + () => { + isOpenNavigationBar.value = false + } +)