refactor: 简化收益曲线顶部指标

- 移除涨跌比例(与下方总收益重复)
- 保留最新净值数字,布局更简洁
- 放大净值字体 44rpx -> 48rpx
This commit is contained in:
claw_bot 2026-03-16 02:44:23 +00:00
parent 536eca27fe
commit 66298f7379

View File

@ -87,15 +87,9 @@
<view v-else class="nav-chart-wrapper"> <view v-else class="nav-chart-wrapper">
<!-- 净值指标 --> <!-- 净值指标 -->
<view class="nav-indicator"> <view class="nav-indicator">
<view class="indicator-main">
<text class="indicator-label">最新净值</text> <text class="indicator-label">最新净值</text>
<text class="indicator-value">{{ (navHistory[navHistory.length - 1]?.nav || 1).toFixed(4) }}</text> <text class="indicator-value">{{ (navHistory[navHistory.length - 1]?.nav || 1).toFixed(4) }}</text>
</view> </view>
<view class="indicator-change" :class="navStatistics?.totalReturn >= 0 ? 'positive' : 'negative'">
<text class="change-arrow">{{ navStatistics?.totalReturn >= 0 ? '↑' : '↓' }}</text>
<text class="change-value">{{ Math.abs(navStatistics?.totalReturn || 0).toFixed(2) }}%</text>
</view>
</view>
<!-- 图表区域 --> <!-- 图表区域 -->
<view class="chart-area"> <view class="chart-area">
@ -1376,18 +1370,12 @@ const deletePortfolio = async () => {
/* 净值指标 */ /* 净值指标 */
.nav-indicator { .nav-indicator {
display: flex;
justify-content: space-between;
align-items: flex-start;
padding: 16rpx 0 24rpx;
border-bottom: 1rpx solid #F3F4F6;
margin-bottom: 16rpx;
}
.indicator-main {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8rpx; gap: 8rpx;
padding: 12rpx 0 16rpx;
border-bottom: 1rpx solid #F3F4F6;
margin-bottom: 12rpx;
} }
.indicator-label { .indicator-label {
@ -1396,50 +1384,12 @@ const deletePortfolio = async () => {
} }
.indicator-value { .indicator-value {
font-size: 44rpx; font-size: 48rpx;
font-weight: 700; font-weight: 700;
font-family: 'DIN Alternate', sans-serif; font-family: 'DIN Alternate', sans-serif;
color: #1F2937; color: #1F2937;
} }
.indicator-change {
display: flex;
align-items: center;
gap: 4rpx;
padding: 8rpx 16rpx;
border-radius: 8rpx;
margin-top: 8rpx;
}
.indicator-change.positive {
background-color: #ECFDF5;
}
.indicator-change.negative {
background-color: #FEF2F2;
}
.change-arrow {
font-size: 28rpx;
font-weight: 600;
}
.indicator-change.positive .change-arrow,
.indicator-change.positive .change-value {
color: #059669;
}
.indicator-change.negative .change-arrow,
.indicator-change.negative .change-value {
color: #DC2626;
}
.change-value {
font-size: 28rpx;
font-weight: 600;
font-family: 'DIN Alternate', sans-serif;
}
/* 图表区域 */ /* 图表区域 */
.chart-area { .chart-area {
width: 100%; width: 100%;