global.scss 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739
  1. /*
  2. * @Author: jmy
  3. * @Date: 2025-12-31 12:02:41
  4. * @LastEditors: Please set LastEditors
  5. * @LastEditTime: 2025-12-13 16:48:17
  6. * @Description:
  7. */
  8. /* 设置字体为苹方(PingFang SC),若系统无该字体则再次回退到 PingFang SC;强制正常字形;禁止文本大小写转换 */
  9. view,
  10. text {
  11. font-family: PingFang SC, PingFang SC;
  12. font-style: normal;
  13. text-transform: none;
  14. }
  15. view{
  16. box-sizing: border-box;
  17. }
  18. // 导航栏头部
  19. .uni-navbar__header {
  20. display: flex;
  21. align-items: center;
  22. padding: 0 24rpx !important;
  23. box-sizing: border-box;
  24. }
  25. .uni-navbar__header-container {
  26. padding: 0 !important;
  27. }
  28. .scs-headr-default {
  29. width: 73%;
  30. }
  31. /* #ifndef APP-NVUE */
  32. /* Display */
  33. .flex {
  34. display: flex;
  35. display: -webkit-flex;
  36. }
  37. /* Flex Direction */
  38. /* 主轴方向:水平,起点在左侧 */
  39. .flex-row {
  40. flex-direction: row;
  41. -webkit-flex-direction: row;
  42. }
  43. /* 主轴方向:水平,起点在右侧 */
  44. .flex-row-reverse {
  45. flex-direction: row-reverse;
  46. -webkit-flex-direction: row-reverse;
  47. }
  48. /* 主轴方向:垂直,起点在上方 */
  49. .flex-column {
  50. flex-direction: column;
  51. -webkit-flex-direction: column;
  52. }
  53. /* 主轴方向:垂直,起点在下方 */
  54. .flex-column-reverse {
  55. flex-direction: column-reverse;
  56. -webkit-flex-direction: column-reverse;
  57. }
  58. /* Flex Wrap */
  59. /* 主轴方向换行:空间不足时自动换行*/
  60. .flex-wrap {
  61. flex-wrap: wrap;
  62. -webkit-flex-wrap: wrap;
  63. }
  64. /*主轴方向不换行:所有子项强制单行/列*/
  65. .flex-nowrap {
  66. flex-wrap: nowrap;
  67. -webkit-flex-wrap: nowrap;
  68. }
  69. /*主轴方向反向换行:空间不足时自动换行,且行序反转*/
  70. .flex-wrap-reverse {
  71. flex-wrap: wrap-reverse;
  72. -webkit-flex-wrap: wrap-reverse;
  73. }
  74. /* Justify Content */
  75. /*主轴对齐:子项在主轴起点对齐*/
  76. .justify-start {
  77. justify-content: flex-start;
  78. -webkit-justify-content: flex-start;
  79. }
  80. /*主轴对齐:子项在主轴起点对齐*/
  81. .justify-center {
  82. justify-content: center;
  83. -webkit-justify-content: center;
  84. }
  85. /* 主轴对齐:子项在主轴终点对齐 */
  86. .justify-end {
  87. justify-content: flex-end;
  88. -webkit-justify-content: flex-end;
  89. }
  90. /* 主轴对齐:首尾子项贴边,其余子项间距相等 */
  91. .justify-between {
  92. justify-content: space-between;
  93. -webkit-justify-content: space-between;
  94. }
  95. /* 主轴对齐:每个子项两侧的间距相等,首尾子项与容器边缘间距为中间间距的一半 */
  96. .justify-around {
  97. justify-content: space-around;
  98. -webkit-justify-content: space-around;
  99. }
  100. /* 主轴对齐:项目之间与两端间距完全相等 */
  101. .justify-evenly {
  102. justify-content: space-evenly;
  103. -webkit-justify-content: space-evenly;
  104. }
  105. /* Align Items */
  106. /* 交叉轴对齐:子项顶部对齐 */
  107. .items-start {
  108. align-items: flex-start;
  109. -webkit-align-items: flex-start;
  110. }
  111. /* 交叉轴对齐:子项居中对齐 */
  112. .items-center {
  113. align-items: center;
  114. -webkit-align-items: center;
  115. }
  116. /* 交叉轴对齐:子项底部对齐 */
  117. .items-end {
  118. align-items: flex-end;
  119. -webkit-align-items: flex-end;
  120. }
  121. /* 交叉轴对齐:子项拉伸填满容器高度 */
  122. .items-stretch {
  123. align-items: stretch;
  124. -webkit-align-items: stretch;
  125. }
  126. /* 交叉轴对齐:子项基线对齐 */
  127. .items-baseline {
  128. align-items: baseline;
  129. -webkit-align-items: baseline;
  130. }
  131. /* 快捷 flex 值:占满剩余空间 */
  132. .flex-1 {
  133. flex: 1;
  134. -webkit-flex: 1;
  135. }
  136. /* 自动伸缩:根据内容决定尺寸,可伸可缩 */
  137. .flex-auto {
  138. flex: auto;
  139. -webkit-flex: auto;
  140. }
  141. /* 初始尺寸:使用 flex-basis 定义的初始大小,可伸可缩 */
  142. .flex-initial {
  143. flex: initial;
  144. -webkit-flex: initial;
  145. }
  146. /* 不伸缩:固定尺寸,不参与分配剩余空间 */
  147. .flex-none {
  148. flex: none;
  149. -webkit-flex: none;
  150. }
  151. /* 禁止放大 */
  152. .flex-grow-0 {
  153. flex-grow: 0;
  154. -webkit-flex-grow: 0;
  155. }
  156. /* 允许放大并占满剩余空间 */
  157. .flex-grow-1 {
  158. flex-grow: 1;
  159. -webkit-flex-grow: 1;
  160. }
  161. /* 禁止缩小 */
  162. .flex-shrink-0 {
  163. flex-shrink: 0;
  164. -webkit-flex-shrink: 0;
  165. }
  166. /* 允许缩小 */
  167. .flex-shrink-1 {
  168. flex-shrink: 1;
  169. -webkit-flex-shrink: 1;
  170. }
  171. /* #endif */
  172. .fw-400 {
  173. font-weight: 400;
  174. }
  175. .fw-500 {
  176. font-weight: 500;
  177. }
  178. .fw-600 {
  179. font-weight: 600;
  180. }
  181. /* 文本对齐方式 */
  182. .text-left {
  183. text-align: left;
  184. }
  185. .text-center {
  186. text-align: center;
  187. }
  188. .text-right {
  189. text-align: right;
  190. }
  191. .text-justify {
  192. text-align: justify;
  193. }
  194. .text-start {
  195. text-align: start;
  196. }
  197. .text-end {
  198. text-align: end;
  199. }
  200. .w-100vw {
  201. width: 100vw;
  202. }
  203. .h-100vh {
  204. height: 100vh;
  205. }
  206. .w-all {
  207. width: 100%;
  208. }
  209. .h-all {
  210. height: 100%;
  211. }
  212. .relative {
  213. position: relative;
  214. }
  215. .absolute {
  216. position: absolute;
  217. }
  218. .fixed {
  219. position: fixed;
  220. }
  221. /* Overflow */
  222. .overflow-visible {
  223. overflow: visible;
  224. }
  225. .overflow-hidden {
  226. overflow: hidden;
  227. }
  228. .overflow-scroll {
  229. overflow: scroll;
  230. }
  231. .overflow-auto {
  232. overflow: auto;
  233. }
  234. .overflow-x-visible {
  235. overflow-x: visible;
  236. }
  237. .overflow-x-hidden {
  238. overflow-x: hidden;
  239. }
  240. .overflow-x-scroll {
  241. overflow-x: scroll;
  242. }
  243. .overflow-x-auto {
  244. overflow-x: auto;
  245. }
  246. .overflow-y-visible {
  247. overflow-y: visible;
  248. }
  249. .overflow-y-hidden {
  250. overflow-y: hidden;
  251. }
  252. .overflow-y-scroll {
  253. overflow-y: scroll;
  254. }
  255. .overflow-y-auto {
  256. overflow-y: auto;
  257. }
  258. .inline-block {
  259. display: inline-block;
  260. }
  261. /* (-500 to 1000px, all numbers, auto convert to rpx: px * 2 = rpx) */
  262. @for $i from -500 through 1000 {
  263. $size: $i * 2rpx;
  264. /* top */
  265. .top-#{$i} {
  266. top: $size;
  267. }
  268. /* left */
  269. .left-#{$i} {
  270. left: $size;
  271. }
  272. /* right */
  273. .right-#{$i} {
  274. right: $size;
  275. }
  276. /* bottom */
  277. .bottom-#{$i} {
  278. bottom: $size;
  279. }
  280. }
  281. /* z-index (-100 to 10000 all numbers) */
  282. @for $i from -100 through 10000 {
  283. .zi-#{$i} {
  284. z-index: $i;
  285. }
  286. }
  287. /* Font sizes (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  288. @for $i from 1 through 100 {
  289. $size: $i * 2rpx;
  290. .fs-#{$i} {
  291. font-size: $size;
  292. }
  293. }
  294. /* line height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  295. @for $i from 1 through 100 {
  296. $size: $i * 2rpx;
  297. .lh-#{$i} {
  298. line-height: $size;
  299. }
  300. }
  301. /* Margins (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  302. @for $i from -500 through 500 {
  303. $size: $i * 2rpx;
  304. /* Margin */
  305. .m-#{$i} {
  306. margin: $size;
  307. }
  308. /* Margin top */
  309. .mt-#{$i} {
  310. margin-top: $size;
  311. }
  312. /* Margin right */
  313. .mr-#{$i} {
  314. margin-right: $size;
  315. }
  316. /* Margin bottom */
  317. .mb-#{$i} {
  318. margin-bottom: $size;
  319. }
  320. /* Margin left */
  321. .ml-#{$i} {
  322. margin-left: $size;
  323. }
  324. /* Margin horizontal */
  325. .mx-#{$i} {
  326. margin-left: $size;
  327. margin-right: $size;
  328. }
  329. /* Margin vertical */
  330. .my-#{$i} {
  331. margin-top: $size;
  332. margin-bottom: $size;
  333. }
  334. }
  335. /* Paddings (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  336. @for $i from 1 through 100 {
  337. $size: $i * 2rpx;
  338. /* Padding */
  339. .p-#{$i} {
  340. padding: $size;
  341. }
  342. /* Padding top */
  343. .pt-#{$i} {
  344. padding-top: $size;
  345. }
  346. /* Padding right */
  347. .pr-#{$i} {
  348. padding-right: $size;
  349. }
  350. /* Padding bottom */
  351. .pb-#{$i} {
  352. padding-bottom: $size;
  353. }
  354. /* Padding left */
  355. .pl-#{$i} {
  356. padding-left: $size;
  357. }
  358. /* Padding horizontal */
  359. .px-#{$i} {
  360. padding-left: $size;
  361. padding-right: $size;
  362. }
  363. /* Padding vertical */
  364. .py-#{$i} {
  365. padding-top: $size;
  366. padding-bottom: $size;
  367. }
  368. }
  369. /* Gaps (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  370. /* #ifndef APP-NVUE */
  371. @for $i from 1 through 100 {
  372. $size: $i * 2rpx;
  373. .gap-#{$i} {
  374. gap: $size;
  375. }
  376. }
  377. /* #endif */
  378. /* Widths (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  379. @for $i from 1 through 1000 {
  380. $size: $i * 2rpx;
  381. .w-#{$i} {
  382. width: $size;
  383. }
  384. }
  385. /* Heights (1px to 375px, all numbers, auto convert to rpx: px * 2 = rpx) */
  386. @for $i from 1 through 1000 {
  387. $size: $i * 2rpx;
  388. .h-#{$i} {
  389. height: $size;
  390. }
  391. }
  392. /* Border Radius (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  393. @for $i from 1 through 100 {
  394. $size: $i * 2rpx;
  395. .rounded-#{$i} {
  396. border-radius: $size;
  397. }
  398. }
  399. @for $i from 1 through 100 {
  400. $size: $i * 2rpx;
  401. .rounded-t-#{$i} {
  402. border-top-left-radius: $size;
  403. border-top-right-radius: $size;
  404. }
  405. }
  406. @for $i from 1 through 100 {
  407. $size: $i * 2rpx;
  408. .rounded-b-#{$i} {
  409. border-bottom-left-radius: $size;
  410. border-bottom-right-radius: $size;
  411. }
  412. }
  413. /* Line Height (1px to 100px, all numbers, auto convert to rpx: px * 2 = rpx) */
  414. @for $i from 1 through 100 {
  415. $size: $i * 2rpx;
  416. .lh-#{$i} {
  417. line-height: $size;
  418. }
  419. }
  420. /* Border Widths (0.5px to 20px, auto convert to rpx: px * 2 = rpx) */
  421. // 0.5px border (1rpx)
  422. .border-w-05 {
  423. border-width: 1rpx;
  424. }
  425. .border-t-w-05 {
  426. border-top-width: 1rpx;
  427. }
  428. .border-r-w-05 {
  429. border-right-width: 1rpx;
  430. }
  431. .border-b-w-05 {
  432. border-bottom-width: 1rpx;
  433. }
  434. .border-l-w-05 {
  435. border-left-width: 1rpx;
  436. }
  437. //borders 1px to 20px
  438. @for $i from 1 through 20 {
  439. $size: $i * 2rpx;
  440. /* all borders */
  441. .border-w-#{$i} {
  442. border-width: $size;
  443. }
  444. /* border top */
  445. .border-t-w-#{$i} {
  446. border-top-width: $size;
  447. }
  448. /* border right */
  449. .border-r-w-#{$i} {
  450. border-right-width: $size;
  451. }
  452. /* border bottom */
  453. .border-b-w-#{$i} {
  454. border-bottom-width: $size;
  455. }
  456. /* border left */
  457. .border-l-w-#{$i} {
  458. border-left-width: $size;
  459. }
  460. }
  461. /* Border Styles */
  462. .border-solid {
  463. border-style: solid;
  464. }
  465. .border-dashed {
  466. border-style: dashed;
  467. }
  468. .border-dotted {
  469. border-style: dotted;
  470. }
  471. .border-double {
  472. border-style: double;
  473. }
  474. .border-none {
  475. border-style: none;
  476. }
  477. /* Border Directions */
  478. .border {
  479. border-style: solid;
  480. border-width: 1rpx;
  481. }
  482. .border-t {
  483. border-top-style: solid;
  484. border-top-width: 1rpx;
  485. }
  486. .border-r {
  487. border-right-style: solid;
  488. border-right-width: 1rpx;
  489. }
  490. .border-b {
  491. border-bottom-style: solid;
  492. border-bottom-width: 1rpx;
  493. }
  494. .border-l {
  495. border-left-style: solid;
  496. border-left-width: 1rpx;
  497. }
  498. /* Clear Border Directions */
  499. .border-t-0 {
  500. border-top-width: 0;
  501. }
  502. .border-r-0 {
  503. border-right-width: 0;
  504. }
  505. .border-b-0 {
  506. border-bottom-width: 0;
  507. }
  508. .border-l-0 {
  509. border-left-width: 0;
  510. }
  511. .border-0 {
  512. border-width: 0;
  513. }
  514. // 定义颜色列表
  515. $colors: (
  516. '000000', '333333', '666666', '999999', 'CCCCCC', 'FFFFFF',
  517. 'FF0000', '00FF00', '0000FF', 'FFFF00', 'FF00FF', '00FFFF',
  518. 'FFA500', '800080', 'FFC0CB', 'A52A2A', '808080', 'D3D3D3',
  519. 'F5F5F5', 'FAFAFA', 'F8F9FA', 'E9ECEF', 'DEE2E6', 'CED4DA',
  520. 'ADB5BD', '6C757D', '495057', '343A40', '212529', '007BFF',
  521. '0069D9', '0056B3', '004085', '002752', '28A745', '218838',
  522. '1E7E34', '155724', '0F3D1F', 'DC3545', 'C82333', 'BD2130',
  523. 'A71E2A', '6E001D', 'FFC107', 'E0A800', 'D39E00', 'B8860B',
  524. '6C5600', '17A2B8', '138496', '117A8B', '0C5460', '062B36',
  525. 'F5F7FA', 'EEEEEE', '02B176', 'FA341E', 'D46C0D', 'FFA599',
  526. 'FF4B33', '38D97D',
  527. );
  528. // 文字颜色类 - 标准化格式
  529. @each $hex in $colors {
  530. .text-#{$hex} {
  531. color: unquote('#')#{$hex};
  532. }
  533. }
  534. // 背景颜色类
  535. @each $hex in $colors {
  536. .bg-#{$hex} {
  537. background-color: unquote('#')#{$hex};
  538. }
  539. }
  540. // 边框颜色类
  541. @each $hex in $colors {
  542. .border-#{$hex} {
  543. border-color: unquote('#')#{$hex};
  544. }
  545. }
  546. /* 主题色彩快捷类 */
  547. .text-blue {
  548. color: #007bff;
  549. }
  550. .text-green {
  551. color: #28a745;
  552. }
  553. .text-red {
  554. color: #dc3545;
  555. }
  556. .text-yellow {
  557. color: #ffc107;
  558. }
  559. .text-cyan {
  560. color: #17a2b8;
  561. }
  562. .text-gray {
  563. color: #f8f9fa;
  564. }
  565. .text-black {
  566. color: #000000;
  567. }
  568. .text-white {
  569. color: #ffffff;
  570. }
  571. .bg-blue {
  572. background-color: #007bff;
  573. }
  574. .bg-green {
  575. background-color: #28a745;
  576. }
  577. .bg-red {
  578. background-color: #dc3545;
  579. }
  580. .bg-yellow {
  581. background-color: #ffc107;
  582. }
  583. .bg-cyan {
  584. background-color: #17a2b8;
  585. }
  586. .bg-gray {
  587. background-color: #f8f9fa;
  588. }
  589. .bg-black {
  590. background-color: #000000;
  591. }
  592. .bg-white {
  593. background-color: #ffffff;
  594. }
  595. /* 透明度类 */
  596. @for $i from 1 through 9 {
  597. .opacity-#{$i} {
  598. opacity: $i * 0.1;
  599. }
  600. }
  601. .opacity-0 {
  602. opacity: 0;
  603. }
  604. .opacity-10 {
  605. opacity: 1;
  606. }