From 3d55ec713983a2f72edad04bda4f62daefbc002a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B4=AA=E6=B4=AA?= <2498601771@qq.com> Date: Thu, 18 Apr 2024 11:58:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=B0=86info=E7=B1=BB=E5=9E=8B=E7=9A=84?= =?UTF-8?q?tag=E9=A2=9C=E8=89=B2=E7=BB=9F=E4=B8=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/tools.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/utils/tools.js b/src/utils/tools.js index 50e38248..ceec8064 100644 --- a/src/utils/tools.js +++ b/src/utils/tools.js @@ -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};` }