From 64cf8c2fda2e2e02a02c3476bf1f78b0f8b53811 Mon Sep 17 00:00:00 2001 From: jiangwel Date: Tue, 9 Sep 2025 16:31:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(theme):=20=E4=B8=BAlightTheme=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0cssVarPrefix=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复ModelModal中baseUrl验证逻辑,支持以/v数字结尾的URL --- ui/ModelModal/src/ModelModal.tsx | 3 +++ ui/ModelModal/src/theme.ts | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ui/ModelModal/src/ModelModal.tsx b/ui/ModelModal/src/ModelModal.tsx index 70805fb..7ef4b8c 100644 --- a/ui/ModelModal/src/ModelModal.tsx +++ b/ui/ModelModal/src/ModelModal.tsx @@ -149,6 +149,9 @@ export const ModelModal: React.FC = ({ baseUrl = baseUrl.slice(0, -1) return true } + if (/\/v\d+$/.test(baseUrl)){ + return true + } return baseUrl.endsWith('volces.com/api/v3') } diff --git a/ui/ModelModal/src/theme.ts b/ui/ModelModal/src/theme.ts index e97ed30..19dbc58 100644 --- a/ui/ModelModal/src/theme.ts +++ b/ui/ModelModal/src/theme.ts @@ -10,7 +10,9 @@ const defaultTheme = createTheme(); const lightTheme = createTheme( { - cssVariables: true, + cssVariables: { + cssVarPrefix: 'modelkit', + }, palette: { // mode: 'light', primary: {