Commit 1ef49e542d23ca44696ec5dd2f6498a4ea8135aa

Authored by vben
1 parent 6b3195b4

fix(menu): fix menu split mode problem

CHANGELOG.zh_CN.md
... ... @@ -21,6 +21,7 @@
21 21 - 修改 `VirtualScroll`和`ImportExcel`组件名为`VScroll`与`ImpExcel`,暂时解决含有关键字的组件在 vue 模版内使用内存溢出
22 22 - 修复 axios 大小写问题
23 23 - 修复按钮样式问题
  24 +- 修复菜单分割模式问题
24 25  
25 26 ## 2.0.0-rc.13 (2020-12-10)
26 27  
... ...
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
... ... @@ -7,7 +7,7 @@ const dashboard: AppRouteModule = {
7 7 path: '/dashboard',
8 8 name: 'Dashboard',
9 9 component: LAYOUT,
10   - redirect: '/dashboard/welcome',
  10 + redirect: '/dashboard/workbench',
11 11 meta: {
12 12 icon: 'bx:bx-home',
13 13 title: t('routes.dashboard.dashboard'),
... ...