From e4e72ba5e949b3d76ccf90a5f430b75d003f1c11 Mon Sep 17 00:00:00 2001 From: shaw Date: Sat, 23 Aug 2025 08:55:52 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BB=AA=E8=A1=A8?= =?UTF-8?q?=E7=9B=98Keys=E7=BB=9F=E8=AE=A1=E5=B1=95=E7=A4=BA=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/admin-spa/src/views/DashboardView.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web/admin-spa/src/views/DashboardView.vue b/web/admin-spa/src/views/DashboardView.vue index 861a5068..3341555d 100644 --- a/web/admin-spa/src/views/DashboardView.vue +++ b/web/admin-spa/src/views/DashboardView.vue @@ -982,7 +982,7 @@ function createApiKeysUsageTrendChart() { } const data = apiKeysTrendData.value.data || [] - const metric = apiKeysTrendMetric + const metric = apiKeysTrendMetric.value // 颜色数组 const colors = [ @@ -1104,7 +1104,7 @@ function createApiKeysUsageTrendChart() { else if (rank === 2) rankIcon = '🥈 ' else if (rank === 3) rankIcon = '🥉 ' - if (apiKeysTrendMetric === 'tokens') { + if (apiKeysTrendMetric.value === 'tokens') { // 格式化token显示 let formattedValue = '' if (value >= 1000000) { @@ -1148,7 +1148,7 @@ function createApiKeysUsageTrendChart() { beginAtZero: true, title: { display: true, - text: apiKeysTrendMetric === 'tokens' ? 'Token 数量' : '请求次数', + text: apiKeysTrendMetric.value === 'tokens' ? 'Token 数量' : '请求次数', color: chartColors.value.text }, ticks: { @@ -1168,7 +1168,7 @@ function createApiKeysUsageTrendChart() { // 更新API Keys使用趋势图 async function updateApiKeysUsageTrendChart() { - await loadApiKeysTrend(apiKeysTrendMetric) + await loadApiKeysTrend(apiKeysTrendMetric.value) await nextTick() createApiKeysUsageTrendChart() }