Skip to content

Commit c469512

Browse files
authored
fix(projects): fix the issue of abnormal width of the sidebar in the top menu mix and reverse mode (#562)
1 parent 613c836 commit c469512

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/layouts/base-layout/index.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,13 @@ function getSiderWidth() {
8585
}
8686
8787
function getSiderCollapsedWidth() {
88+
const { reverseHorizontalMix } = themeStore.layout;
8889
const { collapsedWidth, mixCollapsedWidth, mixChildMenuWidth } = themeStore.sider;
8990
91+
if (isHorizontalMix.value && reverseHorizontalMix) {
92+
return isActiveFirstLevelMenuHasChildren.value ? collapsedWidth : 0;
93+
}
94+
9095
let w = isVerticalMix.value || isHorizontalMix.value ? mixCollapsedWidth : collapsedWidth;
9196
9297
if (isVerticalMix.value && appStore.mixSiderFixed && childLevelMenus.value.length) {

0 commit comments

Comments
 (0)