fix: 将info类型的tag颜色统一

This commit is contained in:
刘洪洪
2024-04-18 11:58:36 +08:00
parent e41a6fb344
commit 3d55ec7139

View File

@@ -1398,7 +1398,13 @@ export function getTagColor (color) {
if (color) {
let backgroundColor = ''
if (color.indexOf('rgb(') > -1) {
backgroundColor = color.replace('rgb(', 'rgba(').replace(')', ',0.06)')
color = color.replace(/\s+/g, '')
if (color === 'rgb(119,131,145)') {
// 此为info原来的颜色修改为统一的info颜色
backgroundColor = 'var(--el-fill-color-light)'
} else {
backgroundColor = color.replace('rgb(', 'rgba(').replace(')', ',0.06)')
}
}
return `color: ${color};border-color: ${color};background-color: ${backgroundColor};`
}