Skip to content

Commit 1ef49e5

Browse files
committed
fix(menu): fix menu split mode problem
1 parent 6b3195b commit 1ef49e5

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

CHANGELOG.zh_CN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- 修改 `VirtualScroll``ImportExcel`组件名为`VScroll``ImpExcel`,暂时解决含有关键字的组件在 vue 模版内使用内存溢出
2222
- 修复 axios 大小写问题
2323
- 修复按钮样式问题
24+
- 修复菜单分割模式问题
2425

2526
## 2.0.0-rc.13 (2020-12-10)
2627

src/components/Menu/src/BasicMenu.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,10 @@ export default defineComponent({
100100

101101
const getWrapperStyle = computed(
102102
(): CSSProperties => {
103-
const isHorizontal = unref(getIsHorizontal);
103+
const isHorizontal = unref(getIsHorizontal) || getSplit.value;
104+
104105
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'})`,
108107
overflowY: isHorizontal ? 'hidden' : 'auto',
109108
};
110109
}

src/layouts/default/header/LayoutMultipleHeader.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default defineComponent({
2121

2222
const injectValue = useLayoutContext();
2323

24-
const { getCalcContentWidth, getSplit } = useMenuSetting();
24+
const { getCalcContentWidth } = useMenuSetting();
2525

2626
const {
2727
getFixed,
@@ -56,8 +56,7 @@ export default defineComponent({
5656
(): CSSProperties => {
5757
const style: CSSProperties = {};
5858
if (unref(getFixed)) {
59-
style.width =
60-
unref(injectValue.isMobile) || unref(getSplit) ? '100%' : unref(getCalcContentWidth);
59+
style.width = unref(injectValue.isMobile) ? '100%' : unref(getCalcContentWidth);
6160
}
6261
if (unref(getShowFullHeaderRef)) {
6362
style.top = `${unref(fullHeaderHeightRef)}px`;

src/router/routes/modules/dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const dashboard: AppRouteModule = {
77
path: '/dashboard',
88
name: 'Dashboard',
99
component: LAYOUT,
10-
redirect: '/dashboard/welcome',
10+
redirect: '/dashboard/workbench',
1111
meta: {
1212
icon: 'bx:bx-home',
1313
title: t('routes.dashboard.dashboard'),

0 commit comments

Comments
 (0)