From 0a93703b9db49f2d62ae2f39aafd9d75195c6192 Mon Sep 17 00:00:00 2001 From: donghao Date: Wed, 10 Jan 2024 15:51:41 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20layout=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/appMain.vue | 41 ++++++++++++---------- src/layout/components/sidebar/vertical.vue | 19 ++++++---- src/layout/index.vue | 35 +++++++++++++++--- src/style/sidebar.scss | 27 ++++++++------ 4 files changed, 83 insertions(+), 39 deletions(-) diff --git a/src/layout/components/appMain.vue b/src/layout/components/appMain.vue index 3f2a244..814d11a 100644 --- a/src/layout/components/appMain.vue +++ b/src/layout/components/appMain.vue @@ -8,7 +8,10 @@ const props = defineProps({ fixedHeader: Boolean }); -const { $storage, $config } = useGlobal(); +const { + // $storage, + $config +} = useGlobal(); const keepAlive = computed(() => { return $config?.KeepAlive; @@ -20,23 +23,23 @@ const transitions = computed(() => { }; }); -const hideTabs = computed(() => { - return $storage?.configure.hideTabs; -}); +// const hideTabs = computed(() => { +// return $storage?.configure.hideTabs; +// }); -const layout = computed(() => { - return $storage?.layout.layout === "vertical"; -}); +// const layout = computed(() => { +// return $storage?.layout.layout === "vertical"; +// }); -const getSectionStyle = computed(() => { - return [ - hideTabs.value && layout ? "padding-top: 48px;" : "", - !hideTabs.value && layout ? "padding-top: 85px;" : "", - hideTabs.value && !layout.value ? "padding-top: 48px" : "", - !hideTabs.value && !layout.value ? "padding-top: 85px;" : "", - props.fixedHeader ? "" : "padding-top: 0;" - ]; -}); +// const getSectionStyle = computed(() => { +// return [ +// hideTabs.value && layout ? "padding-top: 48px;" : "", +// !hideTabs.value && layout ? "padding-top: 85px;" : "", +// hideTabs.value && !layout.value ? "padding-top: 48px" : "", +// !hideTabs.value && !layout.value ? "padding-top: 85px;" : "", +// props.fixedHeader ? "" : "padding-top: 0;" +// ]; +// }); const transitionMain = defineComponent({ render() { @@ -76,7 +79,6 @@ const transitionMain = defineComponent({