components.scss 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181
  1. /******************** 这里放组件样式 ********************/
  2. /***** view *****/
  3. view{box-sizing: border-box;}
  4. /***** 对齐方式 *****/
  5. .ezy-tl{text-align: left;}
  6. .ezy-tc{text-align: center;}
  7. .ezy-tr{text-align: right;}
  8. /***** 状态栏 *****/
  9. .ezy-status-bar{height: var(--status-bar-height);width: 100%;background-color: red;}
  10. /***** 超出省略 *****/
  11. // 文本超出省略号显示 (一行)
  12. @mixin single-line-ellipsis() {text-overflow: ellipsis;overflow: hidden;word-wrap: break-word;white-space: nowrap;word-break: break-all;}
  13. // 文本超出省略号显示 (多行)
  14. @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;}
  15. /***** 页面高度 *****/
  16. /* #ifdef H5 */
  17. //标题栏
  18. $titleBar-page: calc(100vh - var(--status-bar-height));
  19. //tabBar
  20. $titleBar-page: calc(100vh - var(--window-bottom));
  21. //标题栏 + tabBar
  22. $titleBar-tabBar-page: calc(100vh - var(--status-bar-height) - var(--window-bottom));
  23. /* #endif */
  24. /* #ifdef APP-PLUS */
  25. //标题栏
  26. $titleBar-page: calc(100vh - var(--status-bar-height));
  27. //tabBar
  28. $titleBar-page: 100vh;
  29. //标题栏 + tabBar
  30. $titleBar-tabBar-page: calc(100vh - var(--status-bar-height));
  31. /* #endif */
  32. /***** 页面背景图 *****/
  33. // no-repeat cover
  34. @mixin ezy-no-repeat-cover($position: center) {
  35. background-position: $position;background-size: cover;background-repeat: no-repeat;
  36. }
  37. // no-repeat contain
  38. @mixin ezy-no-repeat-contain($position: center) {
  39. background-position: $position;background-size: contain;background-repeat: no-repeat;
  40. }
  41. // 全屏的popup弹窗
  42. .ezy-popup-width-all{
  43. width: 100%;
  44. .uni-popup__wrapper{width: 100%;}
  45. }
  46. /***** tabbar *****/
  47. .ezy-custom-tabbar{
  48. width: 100%;height: 150rpx;position: fixed;left: var(-window-left);right: var(-window right);
  49. bottom: var(--window-bottom);padding-bottom: env(safe-area-inset-bottom);box-sizing: border-box;z-index: 9;
  50. .tabbar-item-box{display: flex;flex-wrap: nowrap;justify-content: space-evenly;
  51. box-sizing: border-box;padding: 0 96rpx;
  52. }
  53. .tabbar-item{width: 135rpx;height: 144rpx;@include ezy-no-repeat-cover;z-index: 2;}
  54. }
  55. .ezy-custom-tabbar::before{
  56. content: '';width: 750rpx;height: 100rpx;left: 0;bottom: 0;position: absolute;
  57. background-image: url("@/static/images/tabbar/tabbar-bg.png");@include ezy-no-repeat-cover(top);
  58. }
  59. /***** 标题栏 *****/
  60. // 三个元素
  61. .ezy-navBar-box{
  62. display: flex;align-items: center;justify-content: space-between;
  63. padding: 0 20rpx 20rpx;box-sizing: border-box;
  64. .nav-bar-icon{
  65. width: 24rpx;height: 38rpx;
  66. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  67. }
  68. .nav-bar-title{
  69. font-size: 36rpx;color: #fff;
  70. }
  71. .nav-bar-other{
  72. font-size: 30rpx;color: #fff;
  73. .key-note{color: #ffff01;}
  74. }
  75. }
  76. // 两个元素
  77. .icon-title-navBar-box{
  78. display: flex;align-items: center;justify-content: center;
  79. padding: 0 20rpx 20rpx;box-sizing: border-box;position: relative;
  80. .nav-bar-title{
  81. font-size: 36rpx;height: 63rpx;line-height: 63rpx;color: #fff;max-width: 70%;
  82. }
  83. .nav-bar-icon{
  84. width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: 12rpx;
  85. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  86. }
  87. }
  88. /***** 单选题 *****/
  89. .ezy-danxuan-box{
  90. margin: 0 10rpx;
  91. .danxuan-title{
  92. width: 231rpx;height: 63rpx;
  93. background-image: url("@/static/images/exam/danxuan-title.png");@include ezy-no-repeat-cover();
  94. }
  95. .danxuan-question{
  96. margin: 24rpx 0 42rpx;font-size: 32rpx;color: #333;line-height: 1.6;padding: 0 10rpx 0 20rpx;box-sizing: border-box;
  97. text-align: justify;word-wrap: break-word;word-break: break-all;
  98. }
  99. .danxuan-option{
  100. width: 596rpx;height: 93rpx;line-height:96rpx;background-color:#fff;border-radius: 8px;margin-bottom: 20rpx;
  101. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 0 24rpx;@include ezy-no-repeat-cover();
  102. }
  103. .danxuan-option.active{
  104. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-active.png");
  105. }
  106. .danxuan-option.showError{
  107. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-error.png");
  108. }
  109. .danxuan-option.active_right{
  110. color: #fff;background-color: transparent;background-image: url("@/static/images/exam/option-right.png");
  111. }
  112. }
  113. /***** 试题白色的框 *****/
  114. .shiti-frame-box{
  115. flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;
  116. margin: 12rpx auto 32rpx;position: relative;padding: 10% 0 6%;box-sizing: border-box;display: flex;flex-direction: column;
  117. }
  118. .shiti-frame-box::before{
  119. content: "";display: block;background-color: rgba(255, 255, 255, 0.6);border-radius: 0 0 10rpx 10rpx;
  120. position: absolute;top: 20rpx;left: 20rpx;right: 20rpx;bottom: 30rpx;z-index: 1;
  121. }
  122. /***** 模拟标题栏 *****/
  123. .ezy-title-bar {
  124. height: calc(44px + env(safe-area-inset-top));
  125. position: fixed;top: var(--status-bar-height);left: var(--window-left);right: var(--window-right);
  126. background-color: rgb(248, 248, 248);color: rgb(0, 0, 0);box-sizing: border-box;
  127. display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
  128. }
  129. // 小的提示弹窗
  130. .ezy-tip-dialog{
  131. .tip-content-box{@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;}
  132. .tip-title{
  133. color: #343434;font-size: 38rpx;margin-bottom: 24rpx;
  134. }
  135. .tip-content{
  136. color: #666;font-size: 32rpx;padding-bottom: 42rpx;
  137. border-bottom: 1px dashed #70cbf4;line-height: 1.6;
  138. }
  139. .tip-btn-box{
  140. width: 100%;display: flex;justify-content: space-between;
  141. .not-confirm-btn,.confirm-btn{
  142. width: 208rpx;height: 83rpx;@include ezy-no-repeat-cover;margin: 30rpx 32rpx 0;
  143. }
  144. .not-confirm-btn{background-image: url("@/static/images/common/tip-cancel-btn.png");}
  145. .confirm-btn{background-image: url("@/static/images/common/tip-confirm-btn.png");}
  146. }
  147. }
  148. .tip-small-dialog{
  149. .tip-content-box{
  150. width: 625rpx;height: 365rpx;padding: 42rpx 48rpx;
  151. background-image: url("@/static/images/common/tip-small-bj.png");
  152. }
  153. }
  154. .tip-middle-dialog{
  155. .tip-content-box{
  156. width: 625rpx;height: 423rpx;padding: 42rpx 48rpx;
  157. background-image: url("@/static/images/common/tip-middle-bj.png");
  158. }
  159. }
  160. .tip-big-dialog{
  161. .tip-content-box{
  162. width: 625rpx;height: 519rpx;padding: 42rpx 48rpx;
  163. background-image: url("@/static/images/common/tip-big-bj.png");
  164. }
  165. .tip-content{min-height: 240rpx;text-align: justify;}
  166. }