From ce3976f8dbe0d9fa0741a4de95f18bdcb23dc867 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Mon, 28 Oct 2024 18:38:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E5=B0=8F=E5=8A=A9=E6=89=8B=E9=A2=9C=E8=89=B2=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/utils/theme.ts | 10 ++++++++++ ui/src/views/chat/embed/index.vue | 9 +++++++-- ui/src/views/chat/pc/index.vue | 13 ++++++++++++- ui/src/workflow/nodes/search-dataset-node/index.vue | 8 ++++++-- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/ui/src/utils/theme.ts b/ui/src/utils/theme.ts index b296cdf3e..96a885938 100644 --- a/ui/src/utils/theme.ts +++ b/ui/src/utils/theme.ts @@ -46,3 +46,13 @@ export const defaultPlatformSetting = { showProject: true, projectUrl: 'https://github.com/1Panel-dev/MaxKB' } + +export function hexToRgba(hex: string, alpha: number) { + // 将16进制颜色值的两个字符一起转换成十进制 + const r = parseInt(hex.slice(1, 3), 16) + const g = parseInt(hex.slice(3, 5), 16) + const b = parseInt(hex.slice(5, 7), 16) + + // 返回RGBA格式的字符串 + return `rgba(${r}, ${g}, ${b}, ${alpha})` +} diff --git a/ui/src/views/chat/embed/index.vue b/ui/src/views/chat/embed/index.vue index 7d2e56d33..5d67b6f81 100644 --- a/ui/src/views/chat/embed/index.vue +++ b/ui/src/views/chat/embed/index.vue @@ -2,7 +2,10 @@
@@ -73,6 +76,7 @@