From c61bc792f29b1d1318ef14fe7e3790bb2a4a0f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=8D=E5=81=9A=E7=A0=81=E5=86=9C?= <599854767@qq.com> Date: Sun, 10 Jul 2022 14:50:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 6 +++--- src/layout/index.vue | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 70d0057..3c23b25 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -8,9 +8,9 @@
- - - + + + diff --git a/src/layout/index.vue b/src/layout/index.vue index 3c244eb..4c93cd5 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -41,7 +41,7 @@ const menuDrawer = computed({ get: () => useAppStore().sidebar.opened, set: (val) => { useAppStore().toggleSideBar(val) - }, + } }) const settingsStore = useSettingsStore() const theme = computed(() => settingsStore.theme) @@ -62,11 +62,11 @@ const cachedViews = computed(() => { const classObj = computed(() => ({ hideSidebar: !sidebar.value.opened, openSidebar: sidebar.value.opened, - mobile: device.value === 'mobile', + mobile: device.value === 'mobile' })) const { width, height } = useWindowSize() -const WIDTH = 992 // refer to Bootstrap's responsive design +const WIDTH = 592 // refer to Bootstrap's responsive design watchEffect(() => { if (device.value === 'mobile' && sidebar.value.opened) { @@ -80,10 +80,6 @@ watchEffect(() => { } }) -function handleClickOutside() { - useAppStore().closeSideBar() -} - const settingRef = ref(null) function setLayout() { settingRef.value.openSetting()