Commit 1ef49e542d23ca44696ec5dd2f6498a4ea8135aa

Authored by vben
1 parent 6b3195b4

fix(menu): fix menu split mode problem

CHANGELOG.zh_CN.md
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
21 - 修改 `VirtualScroll`和`ImportExcel`组件名为`VScroll`与`ImpExcel`,暂时解决含有关键字的组件在 vue 模版内使用内存溢出 21 - 修改 `VirtualScroll`和`ImportExcel`组件名为`VScroll`与`ImpExcel`,暂时解决含有关键字的组件在 vue 模版内使用内存溢出
22 - 修复 axios 大小写问题 22 - 修复 axios 大小写问题
23 - 修复按钮样式问题 23 - 修复按钮样式问题
  24 +- 修复菜单分割模式问题
24 25
25 ## 2.0.0-rc.13 (2020-12-10) 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,11 +100,10 @@ export default defineComponent({
100 100
101 const getWrapperStyle = computed( 101 const getWrapperStyle = computed(
102 (): CSSProperties => { 102 (): CSSProperties => {
103 - const isHorizontal = unref(getIsHorizontal); 103 + const isHorizontal = unref(getIsHorizontal) || getSplit.value;
  104 +
104 return { 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 overflowY: isHorizontal ? 'hidden' : 'auto', 107 overflowY: isHorizontal ? 'hidden' : 'auto',
109 }; 108 };
110 } 109 }
src/layouts/default/header/LayoutMultipleHeader.tsx
@@ -21,7 +21,7 @@ export default defineComponent({ @@ -21,7 +21,7 @@ export default defineComponent({
21 21
22 const injectValue = useLayoutContext(); 22 const injectValue = useLayoutContext();
23 23
24 - const { getCalcContentWidth, getSplit } = useMenuSetting(); 24 + const { getCalcContentWidth } = useMenuSetting();
25 25
26 const { 26 const {
27 getFixed, 27 getFixed,
@@ -56,8 +56,7 @@ export default defineComponent({ @@ -56,8 +56,7 @@ export default defineComponent({
56 (): CSSProperties => { 56 (): CSSProperties => {
57 const style: CSSProperties = {}; 57 const style: CSSProperties = {};
58 if (unref(getFixed)) { 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 if (unref(getShowFullHeaderRef)) { 61 if (unref(getShowFullHeaderRef)) {
63 style.top = `${unref(fullHeaderHeightRef)}px`; 62 style.top = `${unref(fullHeaderHeightRef)}px`;
src/router/routes/modules/dashboard.ts
@@ -7,7 +7,7 @@ const dashboard: AppRouteModule = { @@ -7,7 +7,7 @@ const dashboard: AppRouteModule = {
7 path: '/dashboard', 7 path: '/dashboard',
8 name: 'Dashboard', 8 name: 'Dashboard',
9 component: LAYOUT, 9 component: LAYOUT,
10 - redirect: '/dashboard/welcome', 10 + redirect: '/dashboard/workbench',
11 meta: { 11 meta: {
12 icon: 'bx:bx-home', 12 icon: 'bx:bx-home',
13 title: t('routes.dashboard.dashboard'), 13 title: t('routes.dashboard.dashboard'),