store-theme.less 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342
  1. // RunForge 用户端 / 管理端统一设计令牌(绿色系)
  2. @store-primary: #1b3022;
  3. @store-primary-light: #2d4a38;
  4. @store-accent: #52b878;
  5. @store-accent-hover: #3fa866;
  6. @store-bg: #f4faf6;
  7. @store-card-bg: #ffffff;
  8. @store-card-border: #e2efe6;
  9. @store-text-muted: #4a5c52;
  10. @store-radius: 16px;
  11. @store-radius-sm: 12px;
  12. @store-shadow: 0 4px 24px rgba(27, 48, 34, 0.06);
  13. @store-shadow-hover: 0 12px 40px rgba(27, 48, 34, 0.12);
  14. @store-price: #e85d04;
  15. // 内容区宽度:相对父级 100%,窄栏用 rem 上限(非固定 px)
  16. @store-content-narrow: min(100%, 42rem);
  17. @store-page-padding-x: clamp(12px, 2.5vw, 40px);
  18. @store-page-padding-bottom: clamp(20px, 3vh, 40px);
  19. @app-breakpoint-sm: 576px;
  20. @app-breakpoint-md: 768px;
  21. @app-breakpoint-lg: 992px;
  22. @app-breakpoint-xl: 1280px;
  23. // —— 页面容器(兼容旧 .container)——
  24. .container,
  25. .store-page,
  26. .app-page {
  27. width: 100%;
  28. max-width: 100%;
  29. margin: 0 auto;
  30. padding: 0 @store-page-padding-x @store-page-padding-bottom;
  31. box-sizing: border-box;
  32. }
  33. .app-page--full,
  34. .service-page,
  35. .order-page,
  36. .order-detail-page,
  37. .power-page {
  38. width: 100%;
  39. max-width: none;
  40. }
  41. .app-page--wide {
  42. max-width: none;
  43. }
  44. .app-page__inner,
  45. .service-page__inner,
  46. .power-page__inner,
  47. .order-page__inner,
  48. .order-detail-page__inner {
  49. width: 100%;
  50. margin-left: auto;
  51. margin-right: auto;
  52. }
  53. .app-page__inner--wide,
  54. .service-page__inner--wide,
  55. .power-page__inner--wide,
  56. .order-page__inner,
  57. .order-detail-page__inner {
  58. max-width: 100%;
  59. width: 100%;
  60. }
  61. .app-page__inner--narrow,
  62. .service-page__inner:not(.service-page__inner--wide),
  63. .power-page__inner:not(.power-page__inner--wide) {
  64. max-width: @store-content-narrow;
  65. width: 100%;
  66. }
  67. // —— 页头 / 工具栏 ——
  68. .app-page-header,
  69. .page-header {
  70. display: flex;
  71. flex-wrap: wrap;
  72. align-items: flex-end;
  73. justify-content: space-between;
  74. gap: 12px;
  75. margin-bottom: 16px;
  76. @media (min-width: @app-breakpoint-md) {
  77. gap: 16px;
  78. margin-bottom: 20px;
  79. }
  80. &__text {
  81. flex: 1 1 200px;
  82. min-width: 0;
  83. }
  84. &__actions {
  85. display: flex;
  86. flex-wrap: wrap;
  87. gap: 8px;
  88. align-items: center;
  89. justify-content: flex-end;
  90. }
  91. }
  92. .store-section-title {
  93. margin: 0 0 4px;
  94. font-size: clamp(1.25rem, 4vw, 1.5rem);
  95. font-weight: 600;
  96. color: @store-primary;
  97. line-height: 1.3;
  98. }
  99. .store-section-desc {
  100. margin: 0;
  101. font-size: 0.9rem;
  102. color: @store-text-muted;
  103. line-height: 1.5;
  104. }
  105. .app-notice,
  106. .notice {
  107. margin-bottom: 16px;
  108. border-radius: @store-radius-sm;
  109. }
  110. // —— 按钮 ——
  111. .app-btn-primary,
  112. .submit-btn,
  113. .primary-btn {
  114. border-radius: 999px;
  115. background: @store-primary !important;
  116. border-color: @store-primary !important;
  117. &:hover:not(:disabled) {
  118. background: @store-primary-light !important;
  119. border-color: @store-primary-light !important;
  120. }
  121. }
  122. .buttonGroup,
  123. .app-toolbar {
  124. display: flex;
  125. flex-wrap: wrap;
  126. gap: 8px;
  127. margin-bottom: 16px;
  128. @media (min-width: @app-breakpoint-md) {
  129. gap: 10px;
  130. }
  131. }
  132. // —— 卡片 ——
  133. .container .arco-card,
  134. .store-page .arco-card,
  135. .app-page .arco-card,
  136. .app-card {
  137. max-width: 100%;
  138. overflow: visible;
  139. border-radius: @store-radius;
  140. border: 1px solid @store-card-border;
  141. box-shadow: @store-shadow;
  142. margin-bottom: 16px;
  143. .arco-card-header {
  144. border-bottom: 1px solid @store-card-border;
  145. }
  146. .arco-card-header-title {
  147. font-weight: 600;
  148. color: @store-primary;
  149. }
  150. .arco-card-body {
  151. overflow: visible;
  152. }
  153. }
  154. // —— 表格(移动端横向滚动)——
  155. .app-table-wrap,
  156. .table-wrap {
  157. width: 100%;
  158. overflow-x: auto;
  159. -webkit-overflow-scrolling: touch;
  160. margin-top: 12px;
  161. .arco-table {
  162. min-width: 640px;
  163. }
  164. }
  165. // —— 筛选表单响应式 ——
  166. .app-query-form {
  167. .arco-form-item {
  168. margin-bottom: 12px;
  169. }
  170. }
  171. @media (max-width: @app-breakpoint-lg) {
  172. .app-query-form .arco-row > .arco-col,
  173. .queryForm .arco-row > .arco-col {
  174. flex: 0 0 100% !important;
  175. max-width: 100% !important;
  176. }
  177. .app-query-form .arco-divider-vertical,
  178. .queryForm + .arco-divider,
  179. .queryForm .arco-divider-vertical {
  180. display: none;
  181. }
  182. .app-query-actions,
  183. .queryForm ~ .arco-col[style*='text-align: right'] {
  184. flex: 0 0 100% !important;
  185. max-width: 100% !important;
  186. text-align: left !important;
  187. margin-top: 4px;
  188. }
  189. .arco-modal {
  190. max-width: calc(100vw - 32px);
  191. }
  192. .arco-drawer {
  193. max-width: 100vw;
  194. }
  195. }
  196. // —— Spin ——
  197. .store-spin {
  198. display: block !important;
  199. width: 100% !important;
  200. .arco-spin-children {
  201. width: 100%;
  202. }
  203. }
  204. // —— 商品网格 ——
  205. .goods-grid {
  206. @media (max-width: @app-breakpoint-md) {
  207. grid-template-columns: 1fr !important;
  208. }
  209. }
  210. // —— 搜索框 ——
  211. .store-search.arco-input-wrapper {
  212. background-color: @store-card-bg !important;
  213. border: 1px solid #c5d9cc !important;
  214. border-radius: 999px !important;
  215. box-shadow: @store-shadow !important;
  216. transition: border-color 0.2s, box-shadow 0.2s;
  217. &:hover {
  218. border-color: @store-accent !important;
  219. background-color: @store-card-bg !important;
  220. }
  221. &.arco-input-focus {
  222. border-color: @store-accent !important;
  223. box-shadow: 0 0 0 3px fade(@store-accent, 22%) !important;
  224. }
  225. .arco-input {
  226. background: transparent !important;
  227. color: @store-primary;
  228. &::placeholder {
  229. color: @store-text-muted;
  230. }
  231. }
  232. .arco-input-suffix .arco-icon {
  233. color: @store-accent;
  234. }
  235. }
  236. // —— 弹窗(移动端宽度)——
  237. @media (max-width: @app-breakpoint-md) {
  238. .arco-modal {
  239. width: calc(100vw - 24px) !important;
  240. max-width: calc(100vw - 24px) !important;
  241. margin: 12px auto !important;
  242. }
  243. .arco-modal .arco-modal-body {
  244. max-height: 70vh;
  245. overflow-y: auto;
  246. }
  247. .arco-modal .arco-modal-header {
  248. padding: 14px 16px 10px;
  249. }
  250. .arco-modal .arco-modal-body,
  251. .arco-modal .arco-modal-footer {
  252. padding-left: 16px;
  253. padding-right: 16px;
  254. }
  255. .arco-drawer {
  256. width: 100vw !important;
  257. max-width: 100vw !important;
  258. }
  259. .arco-drawer .arco-drawer-body {
  260. padding: 14px 16px 16px;
  261. }
  262. .arco-drawer .arco-drawer-footer {
  263. padding: 10px 16px 14px;
  264. }
  265. .arco-drawer .arco-drawer-footer .arco-btn {
  266. width: 100%;
  267. }
  268. .arco-tabs-nav {
  269. overflow-x: auto;
  270. overflow-y: hidden;
  271. scrollbar-width: none;
  272. -ms-overflow-style: none;
  273. }
  274. .arco-tabs-nav::-webkit-scrollbar {
  275. display: none;
  276. }
  277. .arco-tabs-nav .arco-tabs-nav-type-line,
  278. .arco-tabs-nav .arco-tabs-nav-type-rounded,
  279. .arco-tabs-nav .arco-tabs-nav-type-card {
  280. min-width: max-content;
  281. }
  282. .arco-descriptions-layout-inline-horizontal .arco-descriptions-item {
  283. width: 100%;
  284. }
  285. .arco-descriptions-layout-inline-horizontal .arco-descriptions-item-label,
  286. .arco-descriptions-layout-inline-horizontal .arco-descriptions-item-value {
  287. width: auto !important;
  288. }
  289. }