refactor: 将系统配置中的“整体风格”更名为“主题模式”,“导航模式”更名为“菜单布局”,以提升命名的专业性与清晰度 (#1247)

This commit is contained in:
xiaoming
2025-11-27 12:24:03 +08:00
committed by GitHub
parent 080ccae0ff
commit fb744dbab7
14 changed files with 66 additions and 66 deletions

View File

@@ -33,7 +33,7 @@ export function useDataThemeChange() {
const { $storage } = useGlobal<GlobalPropertiesApi>();
const dataTheme = ref<boolean>($storage?.layout?.darkMode);
const overallStyle = ref<string>($storage?.layout?.overallStyle);
const themeMode = ref<string>($storage?.layout?.themeMode);
const body = document.documentElement as HTMLElement;
function toggleClass(flag: boolean, clsName: string, target?: HTMLElement) {
@@ -59,7 +59,7 @@ export function useDataThemeChange() {
sidebarStatus: $storage.layout?.sidebarStatus,
epThemeColor: $storage.layout?.epThemeColor,
themeColor: isClick ? theme : storageThemeColor,
overallStyle: overallStyle.value
themeMode: themeMode.value
};
if (theme === "default" || theme === "light") {
@@ -89,9 +89,9 @@ export function useDataThemeChange() {
}
};
/** 浅色、深色整体风格切换 */
function dataThemeChange(overall?: string) {
overallStyle.value = overall;
/** 浅色、深色主题模式切换 */
function dataThemeChange(mode?: string) {
themeMode.value = mode;
if (useEpThemeStoreHook().epTheme === "light" && dataTheme.value) {
setLayoutThemeColor("default", false);
} else {
@@ -126,7 +126,7 @@ export function useDataThemeChange() {
return {
body,
dataTheme,
overallStyle,
themeMode,
layoutTheme,
themeColors,
onReset,

View File

@@ -29,7 +29,7 @@ export function useLayout() {
sidebarStatus: $config?.SidebarStatus ?? true,
epThemeColor: $config?.EpThemeColor ?? "#409EFF",
themeColor: $config?.Theme ?? "light",
overallStyle: $config?.OverallStyle ?? "light"
themeMode: $config?.ThemeMode ?? "light"
};
}
/** 灰色模式、色弱模式、隐藏标签页 */