mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-13 11:24:17 +00:00
perf: 根据系统颜色混合导航栏颜色
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
--menu-text: #646A73;
|
||||
--menu-hover: #f4faf9;
|
||||
--submenu-bg: #ffffff;
|
||||
--nav-bg: #148f76;
|
||||
}
|
||||
|
||||
:export {
|
||||
@@ -20,4 +21,5 @@
|
||||
--menu-text: #646A73;
|
||||
--menu-hover: #f4faf9;
|
||||
--submenu-bg: #ffffff;
|
||||
--nav-bg: #148f76;
|
||||
}
|
||||
|
||||
@@ -68,9 +68,12 @@ export function changeMenuColor(themeColors) {
|
||||
const colors = Object.keys(themeColors).length > 0 ? themeColors : defaultThemeConfig
|
||||
|
||||
const colorValue = colors['--color-primary'].replace(/#/g, '')
|
||||
const black = 'ffffff'
|
||||
const menuHoverColor = mix(black, colorValue, 96)
|
||||
const white = 'ffffff'
|
||||
const black = '000000'
|
||||
const menuHoverColor = mix(white, colorValue, 96)
|
||||
const navBackgroundColor = mix(black, colorValue, 20)
|
||||
elementStyle.setProperty('--menu-hover', menuHoverColor)
|
||||
elementStyle.setProperty('--nav-bg', navBackgroundColor)
|
||||
|
||||
for (const key in colors) {
|
||||
const currentColor = colors[key]
|
||||
|
||||
Reference in New Issue
Block a user