新增:增加深蓝主题;

This commit is contained in:
iczer 2023-03-12 15:51:02 +08:00
parent 7f5fbb7426
commit c8c133fbfb
4 changed files with 28 additions and 4 deletions

View File

@ -12,6 +12,7 @@
<img-checkbox :title="$t('theme.dark')" img="https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg" value="dark"/> <img-checkbox :title="$t('theme.dark')" img="https://gw.alipayobjects.com/zos/rmsportal/LCkqqYNmvBEbokSDscrm.svg" value="dark"/>
<img-checkbox :title="$t('theme.light')" img="https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg" value="light"/> <img-checkbox :title="$t('theme.light')" img="https://gw.alipayobjects.com/zos/rmsportal/jpRkZQMyYRryryPNtyIC.svg" value="light"/>
<img-checkbox :title="$t('theme.night')" img="https://gw.alipayobjects.com/zos/antfincdn/hmKaLQvmY2/LCkqqYNmvBEbokSDscrm.svg" value="night"/> <img-checkbox :title="$t('theme.night')" img="https://gw.alipayobjects.com/zos/antfincdn/hmKaLQvmY2/LCkqqYNmvBEbokSDscrm.svg" value="night"/>
<img-checkbox :title="$t('theme.blue')" img="https://gw.alipayobjects.com/zos/antfincdn/hmKaLQvmY2/LCkqqYNmvBEbokSDscrm.svg" value="blue"/>
</img-checkbox-group> </img-checkbox-group>
</setting-item> </setting-item>
<setting-item :title="$t('theme.color')"> <setting-item :title="$t('theme.color')">

View File

@ -13,9 +13,34 @@ const ANTD = {
}, },
night: { night: {
menuColors: ['#151515', '#1f1f1f', '#1e1e1e'], menuColors: ['#151515', '#1f1f1f', '#1e1e1e'],
},
blue: {
menuColors: ['#1e3a8a'/*二级菜单背景*/, '#1e40af'/*菜单/顶部背景*/, '#1d4ed8'/*logo 背景*/]
} }
}, },
theme: { 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: { dark: {
'layout-body-background': '#f0f2f5', 'layout-body-background': '#f0f2f5',
'body-background': '#fff', 'body-background': '#fff',

View File

@ -10,7 +10,7 @@
vertical-align: middle; vertical-align: middle;
box-shadow: none; box-shadow: none;
} }
&.dark{ &.dark, &.blue{
background: @header-bg-color-dark; background: @header-bg-color-dark;
color: white; color: white;
} }

View File

@ -33,10 +33,8 @@ function getFunctionalColors(mode) {
function getMenuColors(color, mode) { function getMenuColors(color, mode) {
if (mode == themeMode.NIGHT) { if (mode == themeMode.NIGHT) {
return ANTD.primary.night.menuColors return ANTD.primary.night.menuColors
} else if (color == ANTD.primary.color) {
return ANTD.primary.dark.menuColors
} else { } 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)]
} }
} }