mirror of
https://github.com/soybeanjs/soybean-admin.git
synced 2025-09-30 15:16:42 +08:00
fix(projects):fixed the issue where switching the layout mode from mobile to vertical would not restore the user-defined layout mode.
This commit is contained in:
parent
c11d56da29
commit
9fd5d922ac
@ -82,10 +82,12 @@ export const useAppStore = defineStore(SetupStoreId.App, () => {
|
|||||||
watch(
|
watch(
|
||||||
isMobile,
|
isMobile,
|
||||||
newValue => {
|
newValue => {
|
||||||
|
setSiderCollapse(newValue);
|
||||||
if (newValue) {
|
if (newValue) {
|
||||||
setSiderCollapse(true);
|
themeStore.layout.userMode = themeStore.layout.mode;
|
||||||
|
|
||||||
themeStore.setThemeLayout('vertical');
|
themeStore.setThemeLayout('vertical');
|
||||||
|
} else {
|
||||||
|
themeStore.setThemeLayout(themeStore.layout.userMode);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
|
2
src/typings/app.d.ts
vendored
2
src/typings/app.d.ts
vendored
@ -28,6 +28,8 @@ declare namespace App {
|
|||||||
layout: {
|
layout: {
|
||||||
/** Layout mode */
|
/** Layout mode */
|
||||||
mode: UnionKey.ThemeLayoutMode;
|
mode: UnionKey.ThemeLayoutMode;
|
||||||
|
/** User Config mode */
|
||||||
|
userMode: UnionKey.ThemeLayoutMode;
|
||||||
/** Scroll mode */
|
/** Scroll mode */
|
||||||
scrollMode: UnionKey.ThemeScrollMode;
|
scrollMode: UnionKey.ThemeScrollMode;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user