fix: 收益曲线布局修复

1. 统计指标四宫格:缩小字体和间距,增加背景色
2. 图表区域:调整高度为 320rpx,匹配 canvas 绘制尺寸
3. 优化整体布局紧凑度
This commit is contained in:
claw_bot 2026-03-16 02:30:06 +00:00
parent 37a4d8376c
commit 536eca27fe

View File

@ -509,9 +509,9 @@ const drawNavChart = () => {
nextTick(() => { nextTick(() => {
const ctx = uni.createCanvasContext('navChart', this); const ctx = uni.createCanvasContext('navChart', this);
// (rpx -> px) - // (rpx -> px) - CSS 320rpx 160px
const width = 350; const width = 350;
const height = 180; const height = 160;
const padding = { top: 10, right: 10, bottom: 25, left: 10 }; const padding = { top: 10, right: 10, bottom: 25, left: 10 };
const chartWidth = width - padding.left - padding.right; const chartWidth = width - padding.left - padding.right;
const chartHeight = height - padding.top - padding.bottom; const chartHeight = height - padding.top - padding.bottom;
@ -1443,8 +1443,9 @@ const deletePortfolio = async () => {
/* 图表区域 */ /* 图表区域 */
.chart-area { .chart-area {
width: 100%; width: 100%;
height: 360rpx; height: 320rpx;
position: relative; position: relative;
margin: 0 -12rpx;
} }
.nav-canvas { .nav-canvas {
@ -1523,7 +1524,7 @@ const deletePortfolio = async () => {
.nav-stats { .nav-stats {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
gap: 16rpx; gap: 12rpx;
margin-top: 20rpx; margin-top: 20rpx;
padding-top: 20rpx; padding-top: 20rpx;
border-top: 1rpx solid #F3F4F6; border-top: 1rpx solid #F3F4F6;
@ -1531,19 +1532,22 @@ const deletePortfolio = async () => {
.nav-stats .stat-item { .nav-stats .stat-item {
text-align: center; text-align: center;
padding: 12rpx 0; padding: 8rpx 4rpx;
background-color: #F9FAFB;
border-radius: 12rpx;
} }
.nav-stats .stat-label { .nav-stats .stat-label {
display: block; display: block;
font-size: 22rpx; font-size: 20rpx;
color: #9CA3AF; color: #9CA3AF;
margin-bottom: 8rpx; margin-bottom: 6rpx;
white-space: nowrap;
} }
.nav-stats .stat-val { .nav-stats .stat-val {
display: block; display: block;
font-size: 28rpx; font-size: 26rpx;
font-weight: 600; font-weight: 600;
font-family: 'DIN Alternate', sans-serif; font-family: 'DIN Alternate', sans-serif;
color: #1F2937; color: #1F2937;