Skip to content

Commit 9d245b1

Browse files
authored
fix: Safari浏览器兼容性问题处理 (#98)
* fix: 修复日志列表兼容问题 * fix: 仪表盘折线图兼容性问题
1 parent d4dd5ea commit 9d245b1

File tree

6 files changed

+14
-20
lines changed

6 files changed

+14
-20
lines changed

web/package.json

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,7 @@
44
"version": "0.1.0",
55
"description": "GPT Load Balancer Frontend - A modern Vue 3 frontend for GPT load balancing service",
66
"type": "module",
7-
"keywords": [
8-
"vue3",
9-
"typescript",
10-
"vite",
11-
"naive-ui",
12-
"gpt-load",
13-
"frontend"
14-
],
7+
"keywords": ["vue3", "typescript", "vite", "naive-ui", "gpt-load", "frontend"],
158
"author": "tbphp",
169
"license": "MIT",
1710
"repository": {

web/src/components/BaseInfoCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const animatedValues = ref<Record<string, number>>({});
1212
// 格式化数值显示
1313
const formatValue = (value: number, type: "count" | "rate" = "count"): string => {
1414
if (type === "rate") {
15-
return `${value.toFixed(2)}%`;
15+
return `${value.toFixed(1)}%`;
1616
}
1717
if (value >= 1000) {
1818
return `${(value / 1000).toFixed(1)}K`;

web/src/components/LineChart.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -675,6 +675,8 @@ onMounted(() => {
675675
}
676676
677677
.chart-svg {
678+
width: 100%;
679+
height: auto;
678680
background: white;
679681
border-radius: 8px;
680682
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

web/src/components/NavBar.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,7 @@ function renderMenuItem(key: string, label: string, icon: string): MenuOption {
5757

5858
<template>
5959
<div>
60-
<n-menu
61-
:mode="mode"
62-
:options="menuOptions"
63-
:value="activeMenu"
64-
class="modern-menu"
65-
/>
60+
<n-menu :mode="mode" :options="menuOptions" :value="activeMenu" class="modern-menu" />
6661
</div>
6762
</template>
6863

web/src/components/keys/GroupList.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,7 @@ function handleGroupCreated(group: Group) {
127127
</n-button>
128128
</div>
129129
</n-card>
130-
<group-form-modal
131-
v-model:show="showGroupModal"
132-
@success="handleGroupCreated"
133-
/>
130+
<group-form-modal v-model:show="showGroupModal" @success="handleGroupCreated" />
134131
</div>
135132
</template>
136133

web/src/components/logs/LogTable.vue

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,14 @@ function changePageSize(size: number) {
322322
<!-- 表格 -->
323323
<div class="table-container">
324324
<n-spin :show="loading">
325-
<n-data-table :columns="columns" :data="logs" :bordered="false" remote size="small" />
325+
<n-data-table
326+
:columns="columns"
327+
:data="logs"
328+
:bordered="false"
329+
remote
330+
size="small"
331+
:scroll-x="1840"
332+
/>
326333
</n-spin>
327334
</div>
328335

0 commit comments

Comments
 (0)