From 9d245b1e3dbbb334952ad1e5f4ce47bdbd59bb38 Mon Sep 17 00:00:00 2001 From: tbphp Date: Fri, 1 Aug 2025 13:23:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Safari=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E5=85=BC=E5=AE=B9=E6=80=A7=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= =?UTF-8?q?=20(#98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: 修复日志列表兼容问题 * fix: 仪表盘折线图兼容性问题 --- web/package.json | 9 +-------- web/src/components/BaseInfoCard.vue | 2 +- web/src/components/LineChart.vue | 2 ++ web/src/components/NavBar.vue | 7 +------ web/src/components/keys/GroupList.vue | 5 +---- web/src/components/logs/LogTable.vue | 9 ++++++++- 6 files changed, 14 insertions(+), 20 deletions(-) diff --git a/web/package.json b/web/package.json index ce7f98a..7ed16f7 100644 --- a/web/package.json +++ b/web/package.json @@ -4,14 +4,7 @@ "version": "0.1.0", "description": "GPT Load Balancer Frontend - A modern Vue 3 frontend for GPT load balancing service", "type": "module", - "keywords": [ - "vue3", - "typescript", - "vite", - "naive-ui", - "gpt-load", - "frontend" - ], + "keywords": ["vue3", "typescript", "vite", "naive-ui", "gpt-load", "frontend"], "author": "tbphp", "license": "MIT", "repository": { diff --git a/web/src/components/BaseInfoCard.vue b/web/src/components/BaseInfoCard.vue index 57f90f1..d4d3f1d 100644 --- a/web/src/components/BaseInfoCard.vue +++ b/web/src/components/BaseInfoCard.vue @@ -12,7 +12,7 @@ const animatedValues = ref>({}); // 格式化数值显示 const formatValue = (value: number, type: "count" | "rate" = "count"): string => { if (type === "rate") { - return `${value.toFixed(2)}%`; + return `${value.toFixed(1)}%`; } if (value >= 1000) { return `${(value / 1000).toFixed(1)}K`; diff --git a/web/src/components/LineChart.vue b/web/src/components/LineChart.vue index 18d9932..995fb3e 100644 --- a/web/src/components/LineChart.vue +++ b/web/src/components/LineChart.vue @@ -675,6 +675,8 @@ onMounted(() => { } .chart-svg { + width: 100%; + height: auto; background: white; border-radius: 8px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); diff --git a/web/src/components/NavBar.vue b/web/src/components/NavBar.vue index e74ba84..d64d401 100644 --- a/web/src/components/NavBar.vue +++ b/web/src/components/NavBar.vue @@ -57,12 +57,7 @@ function renderMenuItem(key: string, label: string, icon: string): MenuOption { diff --git a/web/src/components/keys/GroupList.vue b/web/src/components/keys/GroupList.vue index 18ef1c4..0be6bde 100644 --- a/web/src/components/keys/GroupList.vue +++ b/web/src/components/keys/GroupList.vue @@ -127,10 +127,7 @@ function handleGroupCreated(group: Group) { - + diff --git a/web/src/components/logs/LogTable.vue b/web/src/components/logs/LogTable.vue index 31bd01c..d5c434b 100644 --- a/web/src/components/logs/LogTable.vue +++ b/web/src/components/logs/LogTable.vue @@ -322,7 +322,14 @@ function changePageSize(size: number) {
- +