From 7b0c52c4bfcd2c2bbcbb1cccdcfbe9f79027224b Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期三, 28 十月 2026 12:43:12 +0800
Subject: [PATCH] 一些项目的首页修改
---
src/stores/theme.ts | 36 +++++++++++++++++++++++++++++++++---
1 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/src/stores/theme.ts b/src/stores/theme.ts
index a016e30..703ec3a 100644
--- a/src/stores/theme.ts
+++ b/src/stores/theme.ts
@@ -1,6 +1,7 @@
import { computed, readonly, ref } from "vue";
+import { APP_COMPANY } from "../config/company";
-export type ThemeKey = "blue" | "green" | "purple";
+export type ThemeKey = "blue" | "electric" | "green" | "aurora" | "purple";
export interface AppTheme {
key: ThemeKey;
@@ -15,7 +16,7 @@
cardBackground: string;
}
-export const THEME_STORAGE_KEY = "mom_app_theme";
+export const THEME_STORAGE_KEY = `mom_app_theme_${APP_COMPANY.key}`;
export const appThemes: AppTheme[] = [
{
@@ -43,6 +44,30 @@
cardBackground: "#ffffff",
},
{
+ key: "electric",
+ name: "鐢靛姏娣辫摑",
+ description: "鍐峰郴娓呮櫚锛岀獊鍑虹數鍔涜繍琛岀姸鎬�",
+ primary: "#0879e8",
+ primaryDark: "#0756ac",
+ primaryLight: "#47a9ff",
+ primarySoft: "#e9f5ff",
+ primaryBorder: "#b7ddff",
+ pageBackground: "#f2f7fb",
+ cardBackground: "#ffffff",
+ },
+ {
+ key: "aurora",
+ name: "鏅鸿兘鏋佸厜",
+ description: "绱潚娓愬彉锛屼綋鐜版櫤鑳界鎶�鎰�",
+ primary: "#7257df",
+ primaryDark: "#5640b7",
+ primaryLight: "#9a84f3",
+ primarySoft: "#f2efff",
+ primaryBorder: "#d9d0ff",
+ pageBackground: "#f7f5fc",
+ cardBackground: "#ffffff",
+ },
+ {
key: "purple",
name: "绉戞妧绱�",
description: "灞傛椴滄槑锛岄�傚悎鏁版嵁鍦烘櫙",
@@ -56,7 +81,12 @@
},
];
-const defaultTheme = appThemes[0];
+const companyDefaultThemeKey: ThemeKey = APP_COMPANY.key === "changhui"
+ ? "electric"
+ : APP_COMPANY.key === "kangyi"
+ ? "aurora"
+ : "blue";
+const defaultTheme = appThemes.find(item => item.key === companyDefaultThemeKey) || appThemes[0];
const currentTheme = ref<AppTheme>(defaultTheme);
function findTheme(key?: string) {
--
Gitblit v1.9.3