tab3.page.scss 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. // 整体背景渐变,可以根据需要调整或移除
  2. .content-background {
  3. background: linear-gradient(to bottom, #e0f7fa, #ffffff);
  4. --padding-bottom: 0;
  5. }
  6. // 标题栏相关样式
  7. .custom-toolbar {
  8. --background: transparent;
  9. display: flex;
  10. justify-content: center;
  11. align-items: center;
  12. padding: 0;
  13. border-bottom: none;
  14. }
  15. .custom-title {
  16. font-size: 1.4em;
  17. font-weight: bold;
  18. color: #000;
  19. text-align: center;
  20. margin: 0;
  21. font-family: "微软雅黑", sans-serif;
  22. }
  23. // 搜索栏区域样式
  24. .search-container {
  25. padding: 0 16px;
  26. margin-top: 8px;
  27. }
  28. .custom-searchbar {
  29. --background: #ffffff;
  30. --border-radius: 20px;
  31. box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  32. }
  33. // 分类区域(可横向滚动)
  34. .category-row {
  35. margin: 0;
  36. }
  37. .category-col {
  38. display: flex;
  39. justify-content: center;
  40. align-items: center;
  41. text-align: center;
  42. margin-bottom: 16px;
  43. }
  44. .category-item {
  45. display: flex;
  46. flex-direction: column; /* 垂直排列:图片在上,文字在下 */
  47. align-items: center;
  48. justify-content: center;
  49. text-align: center;
  50. cursor: pointer; /* 可选:让鼠标移上去有点击手势 */
  51. }
  52. .category-image {
  53. max-width: 90%;
  54. max-height: 90%;
  55. object-fit: contain;
  56. }
  57. .category-text {
  58. font-size: 14px;
  59. color: #333;
  60. font-weight: 500;
  61. text-align: center;
  62. white-space: normal;
  63. max-width: 100%;
  64. }
  65. // 商品列表区域样式
  66. .product-container {
  67. padding: 0 16px;
  68. margin-top: 16px;
  69. }
  70. .product-card {
  71. border-radius: 12px;
  72. box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  73. margin-bottom: 16px;
  74. }
  75. .product-card-header {
  76. background: #ffeb3b;
  77. border-top-left-radius: 12px;
  78. border-top-right-radius: 12px;
  79. display: flex;
  80. align-items: center;
  81. padding: 8px 12px;
  82. }
  83. .product-tag {
  84. font-size: 14px;
  85. font-weight: bold;
  86. color: #333;
  87. }
  88. .product-card-content {
  89. display: flex;
  90. align-items: center;
  91. padding: 12px;
  92. }
  93. .product-image-wrapper {
  94. width: 80px;
  95. height: 80px;
  96. border-radius: 8px;
  97. overflow: hidden;
  98. margin-right: 12px;
  99. }
  100. .product-image {
  101. width: 100%;
  102. height: 100%;
  103. object-fit: cover;
  104. }
  105. .product-info {
  106. flex: 1;
  107. display: flex;
  108. flex-direction: column;
  109. justify-content: center;
  110. }
  111. .product-name {
  112. font-size: 16px;
  113. font-weight: bold;
  114. color: #333;
  115. white-space: normal;
  116. word-break: break-all;
  117. margin-bottom: 4px;
  118. }
  119. .product-price {
  120. font-size: 14px;
  121. color: #e53935;
  122. font-weight: bold;
  123. }
  124. // 底部弹窗(modal)样式
  125. .bottom-modal {
  126. --height: 75vh;
  127. --width: 100%;
  128. --border-radius: 20px 20px 0 0;
  129. --offset-y: calc(100% - 75vh);
  130. }
  131. .modal-content {
  132. padding: 16px;
  133. }
  134. .image-container {
  135. display: flex;
  136. justify-content: center;
  137. margin-bottom: 16px;
  138. }
  139. .medicine-image {
  140. width: 120px;
  141. height: 120px;
  142. object-fit: cover;
  143. border-radius: 8px;
  144. }