@@ -5,8 +5,10 @@ import { useAppStore } from "@/store/modules/app"
55import { useSettingsStore } from " @/store/modules/settings"
66import { AppMain , NavigationBar , Sidebar , TagsView } from " ./components"
77import { useDevice } from " @/hooks/useDevice"
8+ import { useLayoutMode } from " @/hooks/useLayoutMode"
89
910const { isMobile } = useDevice ()
11+ const { isLeft } = useLayoutMode ()
1012const appStore = useAppStore ()
1113const settingsStore = useSettingsStore ()
1214const { showTagsView, fixedHeader } = storeToRefs (settingsStore )
@@ -17,7 +19,8 @@ const layoutClasses = computed(() => {
1719 hideSidebar: ! appStore .sidebar .opened ,
1820 openSidebar: appStore .sidebar .opened ,
1921 withoutAnimation: appStore .sidebar .withoutAnimation ,
20- mobile: isMobile .value
22+ mobile: isMobile .value ,
23+ noLeft: ! isLeft .value
2124 }
2225})
2326
@@ -159,6 +162,12 @@ $transition-time: 0.35s;
159162 transform : translate3d (calc (0px - var (--v3-sidebar-width )), 0 , 0 );
160163 }
161164 }
165+ // 既是 mobile 又是顶部或混合布局模式
166+ & .noLeft {
167+ .sidebar-container {
168+ background-color : var (--el-bg-color );
169+ }
170+ }
162171}
163172
164173.withoutAnimation {
0 commit comments