From 1ac4d7fcb48d41ed8441de469ef717fd6095b5b5 Mon Sep 17 00:00:00 2001 From: lijingjia Date: Mon, 25 Nov 2024 19:17:34 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/design/public.less | 2 +- src/enums/appEnum.ts | 3 +++ src/router/guard/permissionGuard.ts | 8 ++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/design/public.less b/src/design/public.less index 0ffc48c3..6f500e84 100644 --- a/src/design/public.less +++ b/src/design/public.less @@ -17,7 +17,7 @@ // } ::-webkit-scrollbar-track { - background-color: rgb(0 0 0 / 5%); + background-color: #F0F2F5!important; } ::-webkit-scrollbar-thumb { diff --git a/src/enums/appEnum.ts b/src/enums/appEnum.ts index 169d9e4f..48818ead 100644 --- a/src/enums/appEnum.ts +++ b/src/enums/appEnum.ts @@ -17,6 +17,9 @@ export enum ContentEnum { export enum ThemeEnum { DARK = 'dark', LIGHT = 'light', + BLACK = 'black', + BLUE = 'blue', + WHITE = 'white' } export enum SettingButtonPositionEnum { diff --git a/src/router/guard/permissionGuard.ts b/src/router/guard/permissionGuard.ts index a6dcdd93..60de7094 100644 --- a/src/router/guard/permissionGuard.ts +++ b/src/router/guard/permissionGuard.ts @@ -8,6 +8,14 @@ import { useUserStoreWithOut } from '/@/store/modules/user' import { PAGE_NOT_FOUND_ROUTE } from '/@/router/routes/basic' import { RootRoute } from '/@/router/routes' +import { useRootSetting } from '/@/hooks/setting/useRootSetting' +import { baseHandler } from '/@/layouts/default/setting/handler' +const { getDarkMode, setDarkMode } = useRootSetting() +console.log(getDarkMode) +// 设置默认主题 +if (getDarkMode.value === 'light') { + setDarkMode('black') +} const LOGIN_PATH = PageEnum.BASE_LOGIN From 0878409e22ab1e31899a3cc3aa943cc91eaeeadd Mon Sep 17 00:00:00 2001 From: lijingjia Date: Mon, 25 Nov 2024 19:41:41 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/config/themeConfig.ts | 4 ++-- src/components/Application/src/AppLogo.vue | 10 ++++------ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/build/config/themeConfig.ts b/build/config/themeConfig.ts index 2412021a..40ee732b 100644 --- a/build/config/themeConfig.ts +++ b/build/config/themeConfig.ts @@ -5,9 +5,9 @@ */ import { generate } from '@ant-design/colors'; -export const primaryColor = '#257AFA'; +export const primaryColor = '#FF6600'; -export const darkMode = 'light'; +export const darkMode = 'black'; type Fn = (...arg: any) => any; diff --git a/src/components/Application/src/AppLogo.vue b/src/components/Application/src/AppLogo.vue index ef2f0492..6a6dca5e 100644 --- a/src/components/Application/src/AppLogo.vue +++ b/src/components/Application/src/AppLogo.vue @@ -3,13 +3,12 @@ * @Author: lijj * @Date: 2024-07-17 08:39:50 --> -