common-style.scss 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. /* HR 模块公共样式(原 kd-aiot-frontend-hr-H5/src/styles/global.scss 迁移)
  2. 各 hr 页面通过 @import "@/pages/hr/common-style.scss"; 引入(scoped) */
  3. view,
  4. text,
  5. input,
  6. textarea,
  7. button,
  8. scroll-view {
  9. box-sizing: border-box;
  10. }
  11. button {
  12. margin: 0;
  13. padding: 0;
  14. border: 0;
  15. background: none;
  16. line-height: normal;
  17. }
  18. button::after {
  19. border: 0;
  20. }
  21. .page {
  22. min-height: 100vh;
  23. background: #f5f6f7;
  24. padding-bottom: calc(120rpx + env(safe-area-inset-bottom));
  25. }
  26. .page-no-tab {
  27. min-height: 100vh;
  28. background: #f5f6f7;
  29. padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
  30. }
  31. .card {
  32. background: #fff;
  33. border-radius: 20rpx;
  34. }
  35. .section {
  36. margin: 24rpx;
  37. }
  38. /* ============ 模块标题(全 HR 统一) ============
  39. 主题色竖条 + 加粗标题(+ 可选右侧补充信息 / 下方副说明)。
  40. 注意:justify-content 必须是 flex-start —— 标题的子元素只有「竖条 + 文字」,
  41. 若用 space-between 会把标题文字推到最右边;右侧的 .section-more 改用
  42. margin-left: auto 靠右,与左侧竖条互不影响。 */
  43. .section-title {
  44. display: flex;
  45. align-items: center;
  46. justify-content: flex-start;
  47. margin: 36rpx 24rpx 18rpx;
  48. font-size: 32rpx;
  49. font-weight: 700;
  50. color: #1f2329;
  51. letter-spacing: 1rpx;
  52. }
  53. .section-title::before {
  54. content: "";
  55. display: inline-block;
  56. vertical-align: middle;
  57. flex-shrink: 0;
  58. width: 8rpx;
  59. height: 32rpx;
  60. margin-right: 14rpx;
  61. border-radius: 4rpx;
  62. background: linear-gradient(180deg, #1aa53c, #157a2c);
  63. }
  64. .section-more {
  65. margin-left: auto;
  66. padding-left: 20rpx;
  67. color: #8b939f;
  68. font-size: 26rpx;
  69. font-weight: 400;
  70. }
  71. /* 卡片内的模块头:标题 + 副说明;副说明缩进 22rpx 与标题文字左对齐 */
  72. .section-head {
  73. padding: 26rpx 28rpx 12rpx;
  74. border-bottom: 1rpx solid #f2f3f5;
  75. }
  76. .section-head .section-title {
  77. margin: 0;
  78. }
  79. .section-tip {
  80. display: block;
  81. margin: 10rpx 0 0 22rpx;
  82. font-size: 23rpx;
  83. line-height: 1.45;
  84. color: #9aa1ab;
  85. }
  86. /* 原生 <picker> 直接放在 .field 里时**不会撑开**(它不是 flex 子项的内容区),
  87. 结果是「值 + ›」紧贴在标签后面,而不是右对齐。给 picker 加 class="field-picker"
  88. 让它占满剩余宽度并把内容靠右,值区与箭头才会像其它行一样贴右边。 */
  89. .field-picker {
  90. flex: 1;
  91. min-width: 0;
  92. text-align: right;
  93. }
  94. .divider {
  95. height: 1rpx;
  96. background: #edf0f2;
  97. margin-left: 30rpx;
  98. }
  99. .muted {
  100. color: #8b939f;
  101. }
  102. .primary {
  103. color: #157a2c;
  104. }
  105. .success {
  106. color: #07c160;
  107. }
  108. .warning {
  109. color: #f59a23;
  110. }
  111. .danger {
  112. color: #ee4d4d;
  113. }
  114. .status-tag {
  115. display: inline-flex;
  116. padding: 6rpx 14rpx;
  117. border-radius: 999rpx;
  118. font-size: 22rpx;
  119. }
  120. .status-pending {
  121. color: #d9780b;
  122. background: #fff5e7;
  123. }
  124. .status-processing {
  125. color: #4b7902;
  126. background: #f1f8e9;
  127. }
  128. .status-approved {
  129. color: #07893f;
  130. background: #eaf8ef;
  131. }
  132. .status-rejected {
  133. color: #d73a49;
  134. background: #fff0f0;
  135. }
  136. .primary-btn {
  137. height: 92rpx;
  138. border-radius: 12rpx;
  139. background: #157a2c;
  140. color: #fff;
  141. display: flex;
  142. align-items: center;
  143. justify-content: center;
  144. font-size: 32rpx;
  145. font-weight: 500;
  146. }
  147. .ghost-btn {
  148. height: 86rpx;
  149. border-radius: 12rpx;
  150. border: 1rpx solid #d8dce2;
  151. background: #fff;
  152. color: #4b5563;
  153. display: flex;
  154. align-items: center;
  155. justify-content: center;
  156. font-size: 30rpx;
  157. }
  158. .safe-bottom {
  159. padding-bottom: env(safe-area-inset-bottom);
  160. }
  161. .avatar {
  162. display: flex;
  163. align-items: center;
  164. justify-content: center;
  165. flex-shrink: 0;
  166. border-radius: 12rpx;
  167. background: linear-gradient(145deg, #1b8c37, #157a2c);
  168. color: #fff;
  169. font-weight: 600;
  170. }
  171. .press:active {
  172. opacity: 0.7;
  173. }