Commit 1ef49e542d23ca44696ec5dd2f6498a4ea8135aa
1 parent
6b3195b4
fix(menu): fix menu split mode problem
Showing
4 changed files
with
7 additions
and
8 deletions
CHANGELOG.zh_CN.md
src/components/Menu/src/BasicMenu.tsx
... | ... | @@ -100,11 +100,10 @@ export default defineComponent({ |
100 | 100 | |
101 | 101 | const getWrapperStyle = computed( |
102 | 102 | (): CSSProperties => { |
103 | - const isHorizontal = unref(getIsHorizontal); | |
103 | + const isHorizontal = unref(getIsHorizontal) || getSplit.value; | |
104 | + | |
104 | 105 | return { |
105 | - height: isHorizontal | |
106 | - ? `calc(100% + 1px)` | |
107 | - : `calc(100% - ${props.showLogo ? '48px' : '0px'})`, | |
106 | + height: isHorizontal ? `calc(100%)` : `calc(100% - ${props.showLogo ? '48px' : '0px'})`, | |
108 | 107 | overflowY: isHorizontal ? 'hidden' : 'auto', |
109 | 108 | }; |
110 | 109 | } | ... | ... |
src/layouts/default/header/LayoutMultipleHeader.tsx
... | ... | @@ -21,7 +21,7 @@ export default defineComponent({ |
21 | 21 | |
22 | 22 | const injectValue = useLayoutContext(); |
23 | 23 | |
24 | - const { getCalcContentWidth, getSplit } = useMenuSetting(); | |
24 | + const { getCalcContentWidth } = useMenuSetting(); | |
25 | 25 | |
26 | 26 | const { |
27 | 27 | getFixed, |
... | ... | @@ -56,8 +56,7 @@ export default defineComponent({ |
56 | 56 | (): CSSProperties => { |
57 | 57 | const style: CSSProperties = {}; |
58 | 58 | if (unref(getFixed)) { |
59 | - style.width = | |
60 | - unref(injectValue.isMobile) || unref(getSplit) ? '100%' : unref(getCalcContentWidth); | |
59 | + style.width = unref(injectValue.isMobile) ? '100%' : unref(getCalcContentWidth); | |
61 | 60 | } |
62 | 61 | if (unref(getShowFullHeaderRef)) { |
63 | 62 | style.top = `${unref(fullHeaderHeightRef)}px`; | ... | ... |
src/router/routes/modules/dashboard.ts