From c8c133fbfb75d916b9a2fd3d2137bfd486f0ade3 Mon Sep 17 00:00:00 2001 From: iczer <1126263215@qq.com> Date: Sun, 12 Mar 2023 15:51:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=EF=BC=9A=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E6=B7=B1=E8=93=9D=E4=B8=BB=E9=A2=98=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/setting/Setting.vue | 1 + src/config/default/antd.config.js | 25 +++++++++++++++++++++++++ src/layouts/header/index.less | 2 +- src/utils/colors.js | 4 +--- 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/components/setting/Setting.vue b/src/components/setting/Setting.vue index 4d64b14..692aa83 100644 --- a/src/components/setting/Setting.vue +++ b/src/components/setting/Setting.vue @@ -12,6 +12,7 @@ + diff --git a/src/config/default/antd.config.js b/src/config/default/antd.config.js index bc79e63..8624ab9 100644 --- a/src/config/default/antd.config.js +++ b/src/config/default/antd.config.js @@ -13,9 +13,34 @@ const ANTD = { }, night: { menuColors: ['#151515', '#1f1f1f', '#1e1e1e'], + }, + blue: { + menuColors: ['#1e3a8a'/*二级菜单背景*/, '#1e40af'/*菜单/顶部背景*/, '#1d4ed8'/*logo 背景*/] } }, theme: { + blue: { + 'layout-body-background': '#f0f2f5', + 'body-background': '#fff', + 'component-background': '#fff', + 'heading-color': 'rgba(0, 0, 0, 0.85)', + 'text-color': 'rgba(0, 0, 0, 0.65)', + 'text-color-inverse': '#fff', + 'text-color-secondary': 'rgba(0, 0, 0, 0.45)', + 'shadow-color': 'rgba(0, 0, 0, 0.15)', + 'border-color-split': '#f0f0f0', + 'border-color-base': '#d9d9d9', + 'background-color-light': '#fafafa', + 'background-color-base': '#f5f5f5', + 'table-selected-row-bg': '#fafafa', + 'table-expanded-row-bg': '#fbfbfb', + 'checkbox-check-color': '#fff', + 'disabled-color': 'rgba(0, 0, 0, 0.25)', + 'menu-dark-color': 'rgba(254, 254, 254, 0.65)', + 'menu-dark-highlight-color': '#fefefe', + 'menu-dark-arrow-color': '#fefefe', + 'btn-primary-color': '#fff', + }, dark: { 'layout-body-background': '#f0f2f5', 'body-background': '#fff', diff --git a/src/layouts/header/index.less b/src/layouts/header/index.less index f066980..bd10d27 100644 --- a/src/layouts/header/index.less +++ b/src/layouts/header/index.less @@ -10,7 +10,7 @@ vertical-align: middle; box-shadow: none; } - &.dark{ + &.dark, &.blue{ background: @header-bg-color-dark; color: white; } diff --git a/src/utils/colors.js b/src/utils/colors.js index 3951cbf..c7fbdc6 100644 --- a/src/utils/colors.js +++ b/src/utils/colors.js @@ -33,10 +33,8 @@ function getFunctionalColors(mode) { function getMenuColors(color, mode) { if (mode == themeMode.NIGHT) { return ANTD.primary.night.menuColors - } else if (color == ANTD.primary.color) { - return ANTD.primary.dark.menuColors } else { - return [varyColor.darken(color, 0.93), varyColor.darken(color, 0.83), varyColor.darken(color, 0.73)] + return ANTD.primary[mode].menuColors ?? [varyColor.darken(color, 0.93), varyColor.darken(color, 0.83), varyColor.darken(color, 0.73)] } }