mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-10-18 07:54:09 +00:00
feat(layout): added setting. Used to fix the left mixed mode menu
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { MenuSetting } from '/@/types/config';
|
||||
|
||||
import { computed, unref } from 'vue';
|
||||
import { computed, unref, ref } from 'vue';
|
||||
|
||||
import { appStore } from '/@/store/modules/app';
|
||||
|
||||
@@ -8,6 +8,8 @@ import { SIDE_BAR_MINI_WIDTH, SIDE_BAR_SHOW_TIT_MINI_WIDTH } from '/@/enums/appE
|
||||
import { MenuModeEnum, MenuTypeEnum, TriggerEnum } from '/@/enums/menuEnum';
|
||||
import { useFullContent } from '/@/hooks/web/useFullContent';
|
||||
|
||||
const mixSideHasChildren = ref(false);
|
||||
|
||||
// Get menu configuration
|
||||
const getMenuSetting = computed(() => appStore.getProjectConfig.menuSetting);
|
||||
|
||||
@@ -39,6 +41,8 @@ const getCanDrag = computed(() => unref(getMenuSetting).canDrag);
|
||||
|
||||
const getAccordion = computed(() => unref(getMenuSetting).accordion);
|
||||
|
||||
const getMixSideFixed = computed(() => unref(getMenuSetting).mixSideFixed);
|
||||
|
||||
const getTopMenuAlign = computed(() => unref(getMenuSetting).topMenuAlign);
|
||||
|
||||
const getCloseMixSidebarOnChange = computed(() => unref(getMenuSetting).closeMixSidebarOnChange);
|
||||
@@ -87,7 +91,8 @@ const getCalcContentWidth = computed(() => {
|
||||
unref(getIsTopMenu) || !unref(getShowMenu) || (unref(getSplit) && unref(getMenuHidden))
|
||||
? 0
|
||||
: unref(getIsMixSidebar)
|
||||
? SIDE_BAR_SHOW_TIT_MINI_WIDTH
|
||||
? SIDE_BAR_SHOW_TIT_MINI_WIDTH +
|
||||
(unref(getMixSideFixed) && unref(mixSideHasChildren) ? unref(getRealWidth) : 0)
|
||||
: unref(getRealWidth);
|
||||
|
||||
return `calc(100% - ${unref(width)}px)`;
|
||||
@@ -148,5 +153,7 @@ export function useMenuSetting() {
|
||||
getIsMixSidebar,
|
||||
getCloseMixSidebarOnChange,
|
||||
getMixSideTrigger,
|
||||
getMixSideFixed,
|
||||
mixSideHasChildren,
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user