From 9162b2c87c26de1500b2c1991f6e38ef218a4f17 Mon Sep 17 00:00:00 2001 From: wangxiaogang <1433729587@qq.com> Date: Wed, 3 Jun 2026 11:30:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=9B=BE=E8=A1=A8=E4=B8=8D=E6=98=BE=E7=A4=BA=E4=B8=8E=E5=AF=B9?= =?UTF-8?q?=E6=AF=94=E4=B8=8A=E6=9C=88Infinity=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ChartWrapper: 添加 type 属性修复 uCharts 不渲染 - ChartWrapper: 使用 pixelRatio=1 避免双重缩放导致字体线条过大 - ChartWrapper: 统一 fontSize/fontColor/padding 配置 - ChartWrapper: 挂载时保存实例引用避免异步回调中 getCurrentInstance 返回 undefined - stats: Number() 强制类型转换避免字符串导致 Infinity - stats: !prev 宽松判断覆盖 null/undefined/0 除零情况 - stores: fetchOverview/fetchCategoryStats/fetchTrend 确保数据字段为数字 --- .../components/ChartWrapper/ChartWrapper.vue | 100 +++++++++++++----- client/src/pages/stats/index.vue | 34 ++++-- client/src/stores/stats.ts | 24 ++++- 3 files changed, 117 insertions(+), 41 deletions(-) diff --git a/client/src/components/ChartWrapper/ChartWrapper.vue b/client/src/components/ChartWrapper/ChartWrapper.vue index a54e197..0c99479 100644 --- a/client/src/components/ChartWrapper/ChartWrapper.vue +++ b/client/src/components/ChartWrapper/ChartWrapper.vue @@ -1,6 +1,7 @@