From 536eca27fe7bf16567ca079e2f4ea99d48fc390c Mon Sep 17 00:00:00 2001 From: claw_bot Date: Mon, 16 Mar 2026 02:30:06 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=94=B6=E7=9B=8A=E6=9B=B2=E7=BA=BF?= =?UTF-8?q?=E5=B8=83=E5=B1=80=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 统计指标四宫格:缩小字体和间距,增加背景色 2. 图表区域:调整高度为 320rpx,匹配 canvas 绘制尺寸 3. 优化整体布局紧凑度 --- pages/detail/detail.vue | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index 0881802..8e2230f 100755 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -509,9 +509,9 @@ const drawNavChart = () => { nextTick(() => { const ctx = uni.createCanvasContext('navChart', this); - // 画布尺寸 (rpx -> px) - 全宽 + // 画布尺寸 (rpx -> px) - 匹配 CSS 高度 320rpx ≈ 160px const width = 350; - const height = 180; + const height = 160; const padding = { top: 10, right: 10, bottom: 25, left: 10 }; const chartWidth = width - padding.left - padding.right; const chartHeight = height - padding.top - padding.bottom; @@ -1443,8 +1443,9 @@ const deletePortfolio = async () => { /* 图表区域 */ .chart-area { width: 100%; - height: 360rpx; + height: 320rpx; position: relative; + margin: 0 -12rpx; } .nav-canvas { @@ -1523,7 +1524,7 @@ const deletePortfolio = async () => { .nav-stats { display: grid; grid-template-columns: repeat(4, 1fr); - gap: 16rpx; + gap: 12rpx; margin-top: 20rpx; padding-top: 20rpx; border-top: 1rpx solid #F3F4F6; @@ -1531,19 +1532,22 @@ const deletePortfolio = async () => { .nav-stats .stat-item { text-align: center; - padding: 12rpx 0; + padding: 8rpx 4rpx; + background-color: #F9FAFB; + border-radius: 12rpx; } .nav-stats .stat-label { display: block; - font-size: 22rpx; + font-size: 20rpx; color: #9CA3AF; - margin-bottom: 8rpx; + margin-bottom: 6rpx; + white-space: nowrap; } .nav-stats .stat-val { display: block; - font-size: 28rpx; + font-size: 26rpx; font-weight: 600; font-family: 'DIN Alternate', sans-serif; color: #1F2937;