From cd35d3e0d16cb57cb15c2ca20c8a663f21e4bfbf Mon Sep 17 00:00:00 2001 From: vben Date: Tue, 17 Nov 2020 23:45:23 +0800 Subject: [PATCH] fix: fix the occupancy problem of the folding button (#90) --- CHANGELOG.zh_CN.md | 1 + package.json | 2 +- src/layouts/default/header/LayoutHeader.tsx | 19 +++++++++++++------ yarn.lock | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.zh_CN.md b/CHANGELOG.zh_CN.md index 9cbdcf7c..8427647b 100644 --- a/CHANGELOG.zh_CN.md +++ b/CHANGELOG.zh_CN.md @@ -16,6 +16,7 @@ ### 🐛 Bug Fixes - 修复表单 inputNumber 校验错误 +- 修复表单默认值设置错误 ## 2.0.0-rc.10 (2020-11-13) diff --git a/package.json b/package.json index 4cacd4a7..79355d9a 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "dependencies": { "@iconify/iconify": "^2.0.0-rc.2", "@vueuse/core": "^4.0.0-beta.41", - "ant-design-vue": "^2.0.0-beta.15", + "ant-design-vue": "^2.0.0-rc.1", "apexcharts": "3.22.0", "axios": "^0.21.0", "echarts": "^4.9.0", diff --git a/src/layouts/default/header/LayoutHeader.tsx b/src/layouts/default/header/LayoutHeader.tsx index 2865414e..0fa71aab 100644 --- a/src/layouts/default/header/LayoutHeader.tsx +++ b/src/layouts/default/header/LayoutHeader.tsx @@ -119,6 +119,9 @@ export default defineComponent({ const width = unref(widthRef); + const showLeft = + (mode !== MenuModeEnum.HORIZONTAL && showBreadCrumb && !splitMenu) || + unref(showHeaderTrigger); return ( {() => ( @@ -128,12 +131,16 @@ export default defineComponent({ )} -
- {unref(showHeaderTrigger) && } - {mode !== MenuModeEnum.HORIZONTAL && showBreadCrumb && !splitMenu && ( - - )} -
+ {showLeft && ( +
+ {unref(showHeaderTrigger) && ( + + )} + {mode !== MenuModeEnum.HORIZONTAL && showBreadCrumb && !splitMenu && ( + + )} +
+ )} {unref(showTopMenu) && (