mirror of
https://github.com/jumpserver/lina.git
synced 2026-01-16 06:47:13 +00:00
fix: 修复element-ui,link标签hover状态的颜色
This commit is contained in:
@@ -10,14 +10,14 @@ export function changeElementColor(themeColors) {
|
||||
let cssText = originalStyle
|
||||
const colors = generateColors(themeColors)
|
||||
for (const [key, value] of Object.entries(colors)) {
|
||||
const blendColor = mix('ffffff', value.replace(/#/g, ''), 35)
|
||||
cssText = cssText.replace(new RegExp('(:|\\s+)' + key, 'g'), '$1' + `${value}`)
|
||||
colorsCssText += `
|
||||
.color-${key}{color: ${value}!important;}
|
||||
.bg-${key}{background-color: ${value}!important;}
|
||||
.border-${key}{border-color: ${value}!important;}
|
||||
.color-${key}{color: ${value}!important;}
|
||||
.bg-${key}{background-color: ${value}!important;}
|
||||
.border-${key}{border-color: ${value}!important;}
|
||||
`
|
||||
if (['primary', 'success', 'info', 'warning', 'danger'].includes(key)) {
|
||||
const blendColor = mix('ffffff', value.replace(/#/g, ''), 35)
|
||||
colorsCssText = colorsCssText + `
|
||||
.el-button--${key}:focus {
|
||||
background-color: ${value}!important;
|
||||
@@ -30,6 +30,9 @@ export function changeElementColor(themeColors) {
|
||||
background-color: ${blendColor}!important;
|
||||
border-color: ${blendColor}!important;
|
||||
}
|
||||
.el-link.el-link--${key}:hover {
|
||||
color: ${blendColor}!important;
|
||||
}
|
||||
`
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user