fix(projects): fix the issue of abnormal width of the sidebar in the top menu mix and reverse mode (#562)

(cherry picked from commit c469512bd4)
This commit is contained in:
青菜白玉汤 2024-07-22 11:39:19 +08:00 committed by Azir
parent 3a970a090d
commit 2f1f2c2b2a

View File

@ -85,8 +85,13 @@ function getSiderWidth() {
} }
function getSiderCollapsedWidth() { function getSiderCollapsedWidth() {
const { reverseHorizontalMix } = themeStore.layout;
const { collapsedWidth, mixCollapsedWidth, mixChildMenuWidth } = themeStore.sider; const { collapsedWidth, mixCollapsedWidth, mixChildMenuWidth } = themeStore.sider;
if (isHorizontalMix.value && reverseHorizontalMix) {
return isActiveFirstLevelMenuHasChildren.value ? collapsedWidth : 0;
}
let w = isVerticalMix.value || isHorizontalMix.value ? mixCollapsedWidth : collapsedWidth; let w = isVerticalMix.value || isHorizontalMix.value ? mixCollapsedWidth : collapsedWidth;
if (isVerticalMix.value && appStore.mixSiderFixed && childLevelMenus.value.length) { if (isVerticalMix.value && appStore.mixSiderFixed && childLevelMenus.value.length) {