components.scss 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /******************** 这里放组件样式 ********************/
  2. /***** uni组件颜色覆盖 *****/
  3. // select选项面包 确定按钮
  4. .uni-picker-container .uni-picker-action.uni-picker-action-confirm{color: #30c190!important;}
  5. .uni-calendar-item__weeks-box .uni-calendar-item--checked{background-color: #30c190!important;}
  6. .uni-date-changed .uni-datetime-picker--btn{background-color: #30c190!important;}
  7. /***** view *****/
  8. view{box-sizing: border-box;}
  9. /***** 对齐方式 *****/
  10. .ezy-tl{text-align: left;}
  11. .ezy-tc{text-align: center;}
  12. .ezy-tr{text-align: right;}
  13. /***** 状态栏 *****/
  14. .phone-status-bar{height: var(--status-bar-height);width: 100%;}
  15. /***** 超出省略 *****/
  16. // 文本超出省略号显示 (一行)
  17. @mixin single-line-ellipsis() {text-overflow: ellipsis;overflow: hidden;word-wrap: break-word;white-space: nowrap;word-break: break-all;}
  18. // 文本超出省略号显示 (多行)
  19. @mixin multi-line-ellipsis($rows: 3){-webkit-line-clamp:$rows;text-overflow: ellipsis;-o-text-overflow: ellipsis;overflow: hidden;word-wrap: break-word;display: -webkit-box;white-space: normal !important;-webkit-box-orient: vertical;}
  20. /***** 页面背景图 *****/
  21. // no-repeat cover
  22. @mixin ezy-no-repeat-cover($position: center) {
  23. background-position: $position;background-size: cover;background-repeat: no-repeat;
  24. }
  25. // no-repeat contain
  26. @mixin ezy-no-repeat-contain($position: center) {
  27. background-position: $position;background-size: contain;background-repeat: no-repeat;
  28. }
  29. /***** 富文本处理 *****/
  30. @mixin ezy-rich-text() {
  31. white-space: pre-wrap;text-align: justify;
  32. div,p,span{margin: 0;padding: 0;}
  33. img{max-width: 100%;}
  34. .ql-align-center{text-align: center}
  35. .ql-align-right{text-align: right}
  36. // 9号字
  37. .ql-size-9px{font-size: 18rpx;}
  38. // 12号字
  39. .ql-size-12px{font-size: 24rpx;}
  40. // 14号字
  41. .ql-size-14px{font-size: 28rpx;}
  42. // 16号字
  43. .ql-size-16px{font-size: 32rpx;}
  44. // 18号字
  45. .ql-size-18px{font-size: 36rpx;}
  46. // 24号字
  47. .ql-size-24px{font-size: 48rpx;}
  48. // 32号字
  49. .ql-size-32px{font-size: 64rpx;}
  50. // 单倍行距
  51. .line-height-lineHeight1{line-height: 1;}
  52. // 1.5倍行距
  53. .line-height-lineHeight1-5{line-height: 1.5;}
  54. // 2倍行距
  55. .line-height-lineHeight2{line-height: 2;}
  56. // 2.5倍行距
  57. .line-height-lineHeight2-5{line-height: 2.5;}
  58. // 3倍行距
  59. .line-height-lineHeight3{line-height: 3;}
  60. }
  61. /***** 按钮 *****/
  62. // 按钮
  63. .phone-green-btn[type='default']{background-color: #3fd2a1;color: #fff;}
  64. .phone-white-btn[type='default']{background-color: #fff;color: #3fd2a1;border: 1rpx solid #3fd2a1;}
  65. .phone-white-btn[type='default']:after{display: none;}
  66. .phone-green-btn[type='default']:hover{background-color: #34c595;color: #fff;}
  67. /***** 标题栏 *****/
  68. // 三个元素
  69. .phone-navBar-box{
  70. display: flex;align-items: center;justify-content: space-between;background-color: #fff;
  71. padding: calc(20rpx + var(--status-bar-height)) 20rpx 20rpx;box-sizing: border-box;position: relative;
  72. .nav-bar-icon{
  73. width: 24rpx;height: 38rpx;
  74. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  75. }
  76. .nav-bar-title{font-size: 36rpx;color: #333;}
  77. // 考试数字
  78. .nav-bar-other{
  79. font-size: 30rpx;color: #fff;margin-right: 2%;
  80. .key-note{color: #ffff01;}
  81. }
  82. // 文字按钮
  83. .text-btn{font-size: 26rpx;color: #666;padding-top: 4rpx;box-sizing: border-box;}
  84. // 图标
  85. .nav-bar-icon-box{
  86. .nav-bar-right-icon{font-size: 42rpx;color: #666;}
  87. .nav-bar-right-icon + .nav-bar-right-icon{margin-left: 24rpx;}
  88. }
  89. }
  90. // 两个元素
  91. .icon-title-navBar-box,.icon-title-bjcolor-navBar-box{
  92. display: flex;align-items: center;justify-content: center;background-color: #fff;
  93. padding: calc(20rpx + var(--status-bar-height)) 20rpx 20rpx;box-sizing: border-box;position: relative;
  94. .nav-bar-title{
  95. font-size: 32rpx;height: 63rpx;line-height: 63rpx;color: #333;max-width: 70%;
  96. }
  97. .nav-bar-icon{
  98. width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: calc(32rpx + var(--status-bar-height));
  99. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  100. }
  101. .bar-ml10{margin-left: 10rpx;}
  102. .nav-bar-btn{font-size: 24rpx;position: absolute;right: 20rpx;
  103. line-height: 50rpx;border-radius: 8rpx;padding: 0 10rpx;}
  104. }
  105. // 仅一个返回按钮
  106. .phone-nav-bar-icon{width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: var(--status-bar-height);
  107. background-image: url("@/static/images/common/nav-bar-jt.svg");@include ezy-no-repeat-cover();
  108. }