-
-
-
-
- +
+ -
+
+
+
+ {{ $t('layout.hideSidebar') }}
+
+
+
+ {{ $t('layout.hideNavBart') }}
+
+
{{ $t('layout.hideTabs') }}
-
+
{{ $t('layout.labelPersistent') }}
diff --git a/src/layouts/pageLayouts/components/SideNavigationBar/index.vue b/src/layouts/pageLayouts/components/SideNavigationBar/index.vue
index 1871e4b2..7b8929b1 100644
--- a/src/layouts/pageLayouts/components/SideNavigationBar/index.vue
+++ b/src/layouts/pageLayouts/components/SideNavigationBar/index.vue
@@ -1,17 +1,16 @@
-
+
diff --git a/src/locales/en/modules/layout.ts b/src/locales/en/modules/layout.ts
index 27055356..e810658d 100644
--- a/src/locales/en/modules/layout.ts
+++ b/src/locales/en/modules/layout.ts
@@ -6,9 +6,14 @@ const layout = {
greyMode: 'Grey Mode',
colorWeaknessMode: 'Color Weakness Mode',
pageSettings: 'Page Settings',
+ hideSidebar: 'Hide Sidebar',
+ hideNavBart: 'Hide NavBar',
hideTabs: 'Hide Tabs',
labelPersistent: 'Label Persistent',
clearStorage: 'Clear cache and return to login page',
+ navbar: {
+ fullScreen: 'Full Screen',
+ },
};
export default layout;
diff --git a/src/locales/zh-ch/modules/layout.ts b/src/locales/zh-ch/modules/layout.ts
index 09098edd..c9d76e86 100644
--- a/src/locales/zh-ch/modules/layout.ts
+++ b/src/locales/zh-ch/modules/layout.ts
@@ -6,9 +6,14 @@ const layout = {
greyMode: '灰色模式',
colorWeaknessMode: '色弱模式',
pageSettings: '页面设置',
+ hideSidebar: '隐藏侧边栏',
+ hideNavBart: '隐藏顶部导航栏',
hideTabs: '隐藏标签页',
labelPersistent: '标签持久化',
clearStorage: '清空缓存回到登录页',
+ navbar: {
+ fullScreen: '全屏',
+ },
};
export default layout;
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index 4bca2a94..e92a487a 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -14,8 +14,8 @@ const useAppStore = defineStore({
},
},
actions: {
- setAppConfigMode(data: Partial): void {
- const newData = { ...this.appConfigMode, ...data };
+ setAppConfigMode(data: AppConfig): void {
+ const newData = data;
localStorage.setItem('appConfigMode', JSON.stringify(newData));
this.appConfigMode = newData;
},
diff --git a/src/store/types.ts b/src/store/types.ts
index 0007379e..c9d503ae 100644
--- a/src/store/types.ts
+++ b/src/store/types.ts
@@ -9,17 +9,33 @@ export interface AppState {
export type SidebarMode = 'vertical' | 'horizontal' | 'blend';
export interface AppConfig {
+ // 标题
title: string;
+ // 折叠菜单
collapseMenu: boolean;
+ // 菜单显示模式: 'vertical':左侧模式 | 'horizontal':顶部模式 | 'blend':混合模式
sidebarMode: SidebarMode;
+ // 主题模式:夜间主题、白天主题
themeMode: string;
+ // 国际化
locale: string;
+ // storage配置
StorageConfig: StorageConfig;
+ // 移动端菜单
drawerSidebar?: boolean;
+ // 主题颜色
primaryColor: string;
+ // 灰色模式
greyMode: boolean;
+ // 色弱模式
colorWeaknessMode: boolean;
+ // 隐藏侧边菜单栏
+ hideSidebar: boolean;
+ // 隐藏顶部
+ hideNavbart: boolean;
+ // 隐藏标签页
hideTabs: boolean;
+ // 标签持久化
labelPersistent: boolean;
}
diff --git a/src/views/login/index.vue b/src/views/login/index.vue
index d7af979c..1e3ad01a 100644
--- a/src/views/login/index.vue
+++ b/src/views/login/index.vue
@@ -9,10 +9,10 @@
import type { UseInfoType } from '@/server/useInfo';
import { getUserInfo } from '@/server/useInfo';
import { setStorage } from '@/utils/storage';
- import { useAppStoreHook } from '@/store/modules/app';
import { useI18n } from '@/hooks/web/useI18n';
+ import { useRootSetting } from '@/hooks/setting/useRootSetting';
- const { appConfigMode } = useAppStoreHook();
+ const { appConfig } = useRootSetting();
const { t } = useI18n();
@@ -67,7 +67,7 @@

-
{{ appConfigMode.title }}
+{{ appConfig.title }}
{{ $t('sys.login.userName') }}:admin {{ $t('sys.login.password') }}:admin123