fix: 修复修改主题报错问题

This commit is contained in:
“huailei000”
2022-11-29 10:33:36 +08:00
committed by huailei
parent 4af602b706
commit a180265585

View File

@@ -67,7 +67,7 @@ export function changeMenuColor(themeColors) {
const elementStyle = document.documentElement.style
const colors = Object.keys(themeColors).length > 0 ? themeColors : defaultThemeConfig
const colorValue = themeColors['--color-primary'].replace(/#/g, '')
const colorValue = colors['--color-primary'].replace(/#/g, '')
const black = 'ffffff'
const menuHoverColor = mix(black, colorValue, 96)
elementStyle.setProperty('--menu-hover', menuHoverColor)