From 32a2d982c13bcdd2a99cd1e93b7794130bfa5d72 Mon Sep 17 00:00:00 2001 From: Soybean Date: Sat, 11 Nov 2023 18:38:17 +0800 Subject: [PATCH] feat(projects): menu style adapter system --- src/layouts/base-layout/index.vue | 14 +++--- src/layouts/modules/global-menu/base-menu.vue | 49 ++++++++++++++----- .../global-menu/horizontal-mix-menu.vue | 11 +++++ .../theme-drawer/components/setting-item.vue | 2 +- .../theme-drawer/modules/dark-mode.vue | 2 +- src/store/modules/theme/shared.ts | 10 ++-- src/typings/app.d.ts | 19 +++---- 7 files changed, 71 insertions(+), 36 deletions(-) create mode 100644 src/layouts/modules/global-menu/horizontal-mix-menu.vue diff --git a/src/layouts/base-layout/index.vue b/src/layouts/base-layout/index.vue index 2360a70..aabbe80 100644 --- a/src/layouts/base-layout/index.vue +++ b/src/layouts/base-layout/index.vue @@ -56,28 +56,28 @@ const siderWidth = computed(() => getSiderWidth()); const siderCollapsedWidth = computed(() => getSiderCollapsedWidth()); function getSiderWidth() { - const { width, mixedWidth, mixedChildMenuWidth } = themeStore.sider; + const { width, mixWidth, mixChildMenuWidth } = themeStore.sider; const isVerticalMix = themeStore.layout.mode === 'vertical-mix'; - let w = isVerticalMix ? mixedWidth : width; + let w = isVerticalMix ? mixWidth : width; if (isVerticalMix && appStore.mixedSiderFixed) { - w += mixedChildMenuWidth; + w += mixChildMenuWidth; } return w; } function getSiderCollapsedWidth() { - const { collapsedWidth, mixedCollapsedWidth, mixedChildMenuWidth } = themeStore.sider; + const { collapsedWidth, mixCollapsedWidth, mixChildMenuWidth } = themeStore.sider; const isVerticalMix = themeStore.layout.mode === 'vertical-mix'; - let w = isVerticalMix ? mixedCollapsedWidth : collapsedWidth; + let w = isVerticalMix ? mixCollapsedWidth : collapsedWidth; if (isVerticalMix && appStore.mixedSiderFixed) { - w += mixedChildMenuWidth; + w += mixChildMenuWidth; } return w; @@ -100,7 +100,7 @@ function getSiderCollapsedWidth() { :sider-collapsed-width="siderCollapsedWidth" :footer-visible="themeStore.footer.visible" :fixed-footer="themeStore.footer.fixed" - :right-footer="themeStore.footer.floatRight" + :right-footer="themeStore.footer.right" >