PerformanceCard.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="card performance-card">
  3. <view class="performance-item">
  4. <text class="performance-label">历史成功率</text>
  5. <text class="performance-value success">{{ successRate }}</text>
  6. </view>
  7. <view class="performance-item">
  8. <text class="performance-label">平均收益率</text>
  9. <text class="performance-value profit">{{ profitRate }}</text>
  10. </view>
  11. <view class="performance-item">
  12. <text class="performance-label">总交易次数</text>
  13. <text class="performance-value">{{ totalTrades }}</text>
  14. </view>
  15. </view>
  16. </template>
  17. <script setup>
  18. defineProps({
  19. successRate: { type: String, default: '0%' },
  20. profitRate: { type: String, default: '+0%' },
  21. totalTrades: { type: [Number, String], default: 0 }
  22. })
  23. </script>
  24. <style scoped>
  25. .card {
  26. background: #ffffff;
  27. border-radius: 24rpx;
  28. box-shadow: 0 16rpx 40rpx rgba(37, 52, 94, 0.08);
  29. margin-bottom: 32rpx;
  30. }
  31. .performance-card {
  32. display: flex;
  33. justify-content: space-around;
  34. align-items: center;
  35. background: #f7f8fc;
  36. padding: 32rpx 24rpx;
  37. }
  38. .performance-item {
  39. display: flex;
  40. flex-direction: column;
  41. align-items: center;
  42. }
  43. .performance-label {
  44. font-size: 24rpx;
  45. color: #666a7f;
  46. margin-bottom: 12rpx;
  47. }
  48. .performance-value {
  49. font-size: 32rpx;
  50. font-weight: 700;
  51. color: #222222;
  52. }
  53. .performance-value.success {
  54. color: #3abf81;
  55. }
  56. .performance-value.profit {
  57. color: #f16565;
  58. }
  59. </style>