This commit is contained in:
niannian zheng 2026-03-12 19:00:19 +08:00
commit 0ee869d3a8

View File

@ -25,7 +25,7 @@
<text class="stat-label">总盈亏</text> <text class="stat-label">总盈亏</text>
<text class="stat-val" :class="(portfolioData.totalReturn || 0) >= 0 ? 'text-red' : 'text-green'"> <text class="stat-val" :class="(portfolioData.totalReturn || 0) >= 0 ? 'text-red' : 'text-green'">
{{ (portfolioData.totalReturn || 0) >= 0 ? '+' : '' }}{{ getCurrencySymbol(portfolioData.currency) }}{{ (portfolioData.totalReturn || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }} {{ (portfolioData.totalReturn || 0) >= 0 ? '+' : '' }}{{ getCurrencySymbol(portfolioData.currency) }}{{ (portfolioData.totalReturn || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }}
<text style="font-size: 24rpx; opacity: 0.9;"> ({{ (portfolioData.historicalChange || 0) >= 0 ? '+' : '' }}{{ (portfolioData.historicalChange || 0).toFixed(2) }}%)</text> <text style="font-size: 22rpx; opacity: 0.8; margin-left: 8rpx;">({{ (portfolioData.historicalChange || 0) >= 0 ? '+' : '' }}{{ (portfolioData.historicalChange || 0).toFixed(2) }}%)</text>
</text> </text>
</view> </view>
<view class="stat-item align-right"> <view class="stat-item align-right">
@ -138,8 +138,13 @@
</view> </view>
<view class="tl-right"> <view class="tl-right">
<text class="tl-title">{{ log.title }} {{ log.stockCode || '' }}</text> <view class="flex-row justify-between items-center w-full">
<text class="tl-desc">{{ log.type === 'buy' ? '增加' : '减少' }} {{ log.amount }}</text> <text class="tl-title">{{ log.title }} {{ log.stockCode || '' }}</text>
<text class="tl-amount" :class="log.type === 'buy' ? 'text-red' : 'text-green'">
{{ log.type === 'buy' ? '+' : '-' }}{{ getCurrencySymbol(portfolioData.currency) }}{{ (log.amount || 0).toLocaleString('zh-CN', { minimumFractionDigits: 2, maximumFractionDigits: 2 }) }}
</text>
</view>
<text class="tl-desc mt-1">{{ log.type === 'buy' ? '买入' : '卖出' }} 操作</text>
</view> </view>
</view> </view>
</view> </view>
@ -694,15 +699,17 @@ const deletePortfolio = async () => {
/* 交易明细 */ /* 交易明细 */
.timeline-box { padding: 0 16rpx; } .timeline-box { padding: 0 16rpx; }
.timeline-item { display: flex; margin-bottom: 0; min-height: 120rpx; } .timeline-item { display: flex; margin-bottom: 0; min-height: 120rpx; }
.tl-left { width: 80rpx; text-align: right; padding-right: 20rpx; display: flex; flex-direction: column; } .tl-left { width: 120rpx; text-align: right; padding-right: 24rpx; display: flex; flex-direction: column; }
.tl-date { font-size: 26rpx; font-weight: 600; color: #374151; } .tl-date { font-size: 26rpx; font-weight: 600; color: #374151; }
.tl-time { font-size: 22rpx; color: #9CA3AF; margin-top: 4rpx; } .tl-time { font-size: 22rpx; color: #9CA3AF; margin-top: 4rpx; }
.tl-line { width: 40rpx; display: flex; flex-direction: column; align-items: center; position: relative; } .tl-line { width: 40rpx; display: flex; flex-direction: column; align-items: center; position: relative; }
.tl-dot { width: 16rpx; height: 16rpx; border-radius: 50%; z-index: 2; margin-top: 10rpx; } .tl-dot { width: 16rpx; height: 16rpx; border-radius: 50%; z-index: 2; margin-top: 10rpx; }
.tl-dash { width: 2rpx; flex: 1; background-color: #E5E7EB; margin-top: 8rpx; } .tl-dash { width: 2rpx; flex: 1; background-color: #E5E7EB; margin-top: 8rpx; }
.tl-right { flex: 1; padding-left: 20rpx; padding-bottom: 40rpx; } .tl-right { flex: 1; padding-left: 24rpx; padding-bottom: 40rpx; }
.tl-title { font-size: 28rpx; font-weight: 600; color: #1F2937; } .tl-title { font-size: 28rpx; font-weight: 600; color: #1F2937; }
.tl-amount { font-size: 26rpx; font-weight: 700; }
.tl-desc { font-size: 24rpx; color: #6B7280; margin-top: 8rpx; } .tl-desc { font-size: 24rpx; color: #6B7280; margin-top: 8rpx; }
.w-full { width: 100%; }
/* 底部固定操作栏 */ /* 底部固定操作栏 */
.fixed-bottom { .fixed-bottom {