dashboard-metrics.component.scss 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. @use "sass:color";
  2. // iOS主题变量
  3. $ios-spacing-md: 12px;
  4. $ios-spacing-lg: 16px;
  5. $ios-radius-lg: 12px;
  6. $ios-radius-full: 9999px;
  7. $ios-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  8. $ios-shadow-card: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  9. $ios-font-weight-bold: 700;
  10. $ios-font-size-sm: 14px;
  11. $ios-text-primary: #1f2937;
  12. $ios-text-secondary: #6b7280;
  13. $ios-card-background: #ffffff;
  14. $ios-background: #f9fafb;
  15. $ios-border: #e5e7eb;
  16. :host {
  17. display: block;
  18. }
  19. .dashboard-metrics {
  20. display: grid;
  21. grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  22. gap: $ios-spacing-lg;
  23. margin-top: $ios-spacing-lg;
  24. .metric-card {
  25. display: flex;
  26. align-items: center;
  27. gap: $ios-spacing-md;
  28. background: linear-gradient(135deg, $ios-card-background, #f8f9fa);
  29. border-radius: $ios-radius-lg;
  30. padding: $ios-spacing-lg;
  31. border: 1px solid $ios-border;
  32. box-shadow: $ios-shadow-sm;
  33. cursor: pointer;
  34. transition: all 0.3s ease;
  35. &:hover {
  36. transform: translateY(-2px);
  37. box-shadow: $ios-shadow-card;
  38. }
  39. .metric-icon {
  40. font-size: 2rem;
  41. width: 50px;
  42. height: 50px;
  43. display: flex;
  44. align-items: center;
  45. justify-content: center;
  46. border-radius: $ios-radius-full;
  47. background-color: $ios-background;
  48. }
  49. .metric-icon.warning { background-color: rgba(255, 149, 0, 0.1); }
  50. .metric-icon.info { background-color: rgba(59, 130, 246, 0.1); }
  51. .metric-icon.primary { background-color: rgba(124, 58, 237, 0.1); }
  52. .metric-icon.danger { background-color: rgba(239, 68, 68, 0.1); }
  53. .metric-icon.success { background-color: rgba(16, 185, 129, 0.1); }
  54. .metric-content { flex: 1; }
  55. .metric-count {
  56. font-size: 2rem;
  57. font-weight: $ios-font-weight-bold;
  58. color: $ios-text-primary;
  59. line-height: 1.2;
  60. }
  61. .metric-label {
  62. font-size: $ios-font-size-sm;
  63. color: $ios-text-secondary;
  64. text-transform: uppercase;
  65. letter-spacing: 0.5px;
  66. }
  67. }
  68. }