Skip to content

Commit

Permalink
fix(menu): fix menu split mode problem
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Dec 11, 2020
1 parent 6b3195b commit 1ef49e5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- 修改 `VirtualScroll``ImportExcel`组件名为`VScroll``ImpExcel`,暂时解决含有关键字的组件在 vue 模版内使用内存溢出
- 修复 axios 大小写问题
- 修复按钮样式问题
- 修复菜单分割模式问题

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

Expand Down
7 changes: 3 additions & 4 deletions src/components/Menu/src/BasicMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ export default defineComponent({

const getWrapperStyle = computed(
(): CSSProperties => {
const isHorizontal = unref(getIsHorizontal);
const isHorizontal = unref(getIsHorizontal) || getSplit.value;

return {
height: isHorizontal
? `calc(100% + 1px)`
: `calc(100% - ${props.showLogo ? '48px' : '0px'})`,
height: isHorizontal ? `calc(100%)` : `calc(100% - ${props.showLogo ? '48px' : '0px'})`,
overflowY: isHorizontal ? 'hidden' : 'auto',
};
}
Expand Down
5 changes: 2 additions & 3 deletions src/layouts/default/header/LayoutMultipleHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineComponent({

const injectValue = useLayoutContext();

const { getCalcContentWidth, getSplit } = useMenuSetting();
const { getCalcContentWidth } = useMenuSetting();

const {
getFixed,
Expand Down Expand Up @@ -56,8 +56,7 @@ export default defineComponent({
(): CSSProperties => {
const style: CSSProperties = {};
if (unref(getFixed)) {
style.width =
unref(injectValue.isMobile) || unref(getSplit) ? '100%' : unref(getCalcContentWidth);
style.width = unref(injectValue.isMobile) ? '100%' : unref(getCalcContentWidth);
}
if (unref(getShowFullHeaderRef)) {
style.top = `${unref(fullHeaderHeightRef)}px`;
Expand Down
2 changes: 1 addition & 1 deletion src/router/routes/modules/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const dashboard: AppRouteModule = {
path: '/dashboard',
name: 'Dashboard',
component: LAYOUT,
redirect: '/dashboard/welcome',
redirect: '/dashboard/workbench',
meta: {
icon: 'bx:bx-home',
title: t('routes.dashboard.dashboard'),
Expand Down

0 comments on commit 1ef49e5

Please sign in to comment.