Skip to content

Commit

Permalink
fix: 修复 release v4.5.5 版本引起的 mobile + 非左侧布局模式时左侧导航菜单背景色异常的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
pany-ang committed Dec 3, 2024
1 parent 2d840ea commit d3fc20a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/layouts/LeftMode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ import { useAppStore } from "@/store/modules/app"
import { useSettingsStore } from "@/store/modules/settings"
import { AppMain, NavigationBar, Sidebar, TagsView } from "./components"
import { useDevice } from "@/hooks/useDevice"
import { useLayoutMode } from "@/hooks/useLayoutMode"
const { isMobile } = useDevice()
const { isLeft } = useLayoutMode()
const appStore = useAppStore()
const settingsStore = useSettingsStore()
const { showTagsView, fixedHeader } = storeToRefs(settingsStore)
Expand All @@ -17,7 +19,8 @@ const layoutClasses = computed(() => {
hideSidebar: !appStore.sidebar.opened,
openSidebar: appStore.sidebar.opened,
withoutAnimation: appStore.sidebar.withoutAnimation,
mobile: isMobile.value
mobile: isMobile.value,
noLeft: !isLeft.value
}
})
Expand Down Expand Up @@ -159,6 +162,12 @@ $transition-time: 0.35s;
transform: translate3d(calc(0px - var(--v3-sidebar-width)), 0, 0);
}
}
// 既是 mobile 又是顶部或混合布局模式
&.noLeft {
.sidebar-container {
background-color: var(--el-bg-color);
}
}
}
.withoutAnimation {
Expand Down

0 comments on commit d3fc20a

Please sign in to comment.