components.scss 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270
  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. /***** 富文本处理 *****/
  42. @mixin ezy-rich-text() {
  43. div,p,span{margin: 0;padding: 0;}
  44. img{max-width: 100%;}
  45. }
  46. // 全屏的popup弹窗
  47. .ezy-popup-width-all{
  48. width: 100%;
  49. .uni-popup__wrapper{width: 100%;}
  50. }
  51. /***** tabbar *****/
  52. .ezy-custom-tabbar{
  53. width: 100%;height: 150rpx;position: fixed;left: var(-window-left);right: var(-window right);
  54. bottom: var(--window-bottom);padding-bottom: env(safe-area-inset-bottom);box-sizing: border-box;z-index: 9;
  55. .tabbar-item-box{display: flex;flex-wrap: nowrap;justify-content: space-evenly;
  56. box-sizing: border-box;padding: 0 96rpx;
  57. }
  58. .tabbar-item{width: 135rpx;height: 144rpx;@include ezy-no-repeat-cover;z-index: 2;}
  59. }
  60. .ezy-custom-tabbar::before{
  61. content: '';width:100%;height: 100rpx;left: 0;right:0;bottom: 0;position: absolute;
  62. background-image: url("@/static/images/tabbar/tabbar-bg.png");@include ezy-no-repeat-cover(top);
  63. }
  64. /***** 标题栏 *****/
  65. // 三个元素
  66. .ezy-navBar-box{
  67. display: flex;align-items: center;justify-content: space-between;
  68. padding: 0 20rpx 20rpx;box-sizing: border-box;position: relative;
  69. .nav-bar-icon{
  70. width: 24rpx;height: 38rpx;
  71. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  72. }
  73. .nav-bar-title{font-size: 36rpx;color: #fff;}
  74. // 考试数字
  75. .nav-bar-other{
  76. font-size: 30rpx;color: #fff;margin-right: 2%;
  77. .key-note{color: #ffff01;}
  78. }
  79. // 文字按钮
  80. .text-btn{font-size: 26rpx;color: #fff;padding-top: 4rpx;box-sizing: border-box;}
  81. }
  82. // 两个元素
  83. .icon-title-navBar-box{
  84. display: flex;align-items: center;justify-content: center;
  85. padding: 0 20rpx 20rpx;box-sizing: border-box;position: relative;
  86. .nav-bar-title{
  87. font-size: 36rpx;height: 63rpx;line-height: 63rpx;color: #fff;max-width: 70%;
  88. }
  89. .nav-bar-icon{
  90. width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: 12rpx;
  91. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  92. }
  93. }
  94. // 仅一个返回按钮
  95. .ezy-nav-bar-icon{width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: var(--status-bar-height);
  96. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  97. }
  98. /***** 试题---题干 *****/
  99. .ezy-shiti-question{
  100. margin: 24rpx 0 42rpx;font-size: 32rpx;color: #333;line-height: 1.6;padding: 0 10rpx;box-sizing: border-box;
  101. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;@include ezy-rich-text;
  102. }
  103. /***** 单选题 *****/
  104. .ezy-danxuan-box{
  105. margin: 0 10rpx;
  106. .danxuan-title{
  107. width: 231rpx;height: 63rpx;
  108. background-image: url("@/static/images/exam/danxuan-title.png");@include ezy-no-repeat-cover();
  109. }
  110. .danxuan-option-box{
  111. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  112. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 10rpx 24rpx;
  113. display: flex;
  114. .option-change{
  115. width: 48rpx;height: 48rpx;line-height: 48rpx;box-sizing: border-box;
  116. flex-shrink: 0;border-radius: 50%;border: 1rpx solid;margin-right: 16rpx;
  117. display: flex;align-items: center;justify-content: center;
  118. }
  119. .option-question{font-size: 32rpx;line-height: 1.6;margin-left: 6rpx;@include ezy-rich-text;
  120. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;}
  121. }
  122. .danxuan-option-box.active .option-change{color: #FFF;background-color:#0589e9;border-color:#0589e9;}
  123. .danxuan-option-box.showError .option-change{color: #FFF;background-color:#ff5757;border-color:#ff5757;}
  124. .danxuan-option-box.active_right .option-change{color: #FFF;background-color:#1ac136;border-color:#1ac136;}
  125. }
  126. /***** 判断题 *****/
  127. .ezy-panduan-box{
  128. margin: 0 10rpx;
  129. .panduan-title{
  130. width: 231rpx;height: 63rpx;
  131. background-image: url("@/static/images/exam/panduan-title.png");@include ezy-no-repeat-cover();
  132. }
  133. .danxuan-option-box{
  134. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  135. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 10rpx 24rpx;
  136. }
  137. .uni-radio-input{
  138. width: 56rpx;height: 56rpx;border: 0;@include ezy-no-repeat-cover();
  139. background-image: url("@/static/images/exam/option-bj.png");}
  140. .option-question{display: flex;}
  141. .option-question.active .uni-radio-input{
  142. background-image: url("@/static/images/exam/option-active-img.png");
  143. background-color: transparent!important;
  144. svg{display: none;}
  145. }
  146. .option-question.showError .uni-radio-input{
  147. background-image: url("@/static/images/exam/option-error-img.png");
  148. background-color: transparent!important;
  149. svg{display: none;}
  150. }
  151. .option-question.active_right .uni-radio-input{
  152. background-image: url("@/static/images/exam/option-right-img.png");
  153. background-color: transparent!important;
  154. svg{display: none;}
  155. }
  156. }
  157. /***** 填空题 *****/
  158. .ezy-tiankong-box{
  159. .tiankongn-title{
  160. width: 231rpx;height: 63rpx;
  161. background-image: url("@/static/images/exam/tiankong-title.png");@include ezy-no-repeat-cover;
  162. }
  163. .tiankong-input {width: 50px;height: 32rpx;border: 1px solid #999;}
  164. .tk-input-box{display: inline-block;position: relative;font-size: 0;}
  165. .tiankong-input{text-align: center;}
  166. .tiankong-input.showError{color: #ff5757;}
  167. .tiankong-input.active_right{color: green;}
  168. .tk-input-box.showError::after{
  169. content: '';width: 30rpx;height: 30rpx;display: block;position: absolute;top: -12rpx;right: -6rpx;
  170. background-image: url("@/static/images/exam/option-error-img.png");@include ezy-no-repeat-cover;
  171. }
  172. .tk-input-box.active_right::after{
  173. content: '';width: 30rpx;height: 30rpx;display: block;position: absolute;top: -12rpx;right: -6rpx;
  174. background-image: url("@/static/images/exam/option-right-img.png");@include ezy-no-repeat-cover;
  175. }
  176. .ezy-shiti-question li{margin: 20rpx 0;}
  177. }
  178. /***** 试题白色的框 *****/
  179. .shiti-frame-box{
  180. flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;
  181. margin: 12rpx auto 32rpx;position: relative;padding: 10% 0 6%;box-sizing: border-box;display: flex;flex-direction: column;
  182. }
  183. .shiti-frame-box::before{
  184. content: "";display: block;background-color: rgba(255, 255, 255, 0.6);border-radius: 0 0 10rpx 10rpx;
  185. position: absolute;top: 20rpx;left: 20rpx;right: 20rpx;bottom: 30rpx;z-index: 1;
  186. }
  187. /***** 模拟标题栏 *****/
  188. .ezy-title-bar {
  189. height: calc(44px + env(safe-area-inset-top));
  190. position: fixed;top: var(--status-bar-height);left: var(--window-left);right: var(--window-right);
  191. background-color: rgb(248, 248, 248);color: rgb(0, 0, 0);box-sizing: border-box;
  192. display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
  193. }
  194. // 小的提示弹窗
  195. .ezy-tip-dialog{
  196. .tip-content-box{@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;}
  197. .tip-title{
  198. color: #343434;font-size: 38rpx;margin-bottom: 24rpx;
  199. }
  200. .tip-content{
  201. color: #666;font-size: 32rpx;padding-bottom: 42rpx;
  202. border-bottom: 1px dashed #70cbf4;line-height: 1.6;
  203. }
  204. .tip-btn-box{
  205. width: 100%;display: flex;justify-content: space-between;
  206. .not-confirm-btn,.confirm-btn{
  207. width: 208rpx;height: 83rpx;@include ezy-no-repeat-cover;margin: 30rpx 32rpx 0;
  208. }
  209. .not-confirm-btn{background-image: url("@/static/images/common/tip-cancel-btn.png");}
  210. .confirm-btn{background-image: url("@/static/images/common/tip-confirm-btn.png");}
  211. }
  212. }
  213. .tip-small-dialog{
  214. .tip-content-box{
  215. width: 625rpx;height: 365rpx;padding: 42rpx 48rpx;
  216. background-image: url("@/static/images/common/tip-small-bj.png");
  217. }
  218. }
  219. .tip-middle-dialog{
  220. .tip-content-box{
  221. width: 625rpx;height: 423rpx;padding: 42rpx 48rpx;
  222. background-image: url("@/static/images/common/tip-middle-bj.png");
  223. }
  224. }
  225. .tip-big-dialog{
  226. .tip-content-box{
  227. width: 625rpx;height: 519rpx;padding: 42rpx 48rpx;
  228. background-image: url("@/static/images/common/tip-big-bj.png");
  229. }
  230. .tip-content{min-height: 240rpx;text-align: justify;}
  231. }
  232. /*积分框*/
  233. .ezy-jf-box{
  234. width: 142rpx;height: 46rpx;display: flex;align-items: center;line-height: 1.2;font-size: 26rpx;
  235. @include ezy-no-repeat-cover;background-image: url("@/static/images/common/jf-bj.png");margin-top: 20rpx;
  236. .jf-icon{width: 35rpx;height: 35rpx;margin:0 4rpx 0 10rpx;flex-shrink: 0;
  237. @include ezy-no-repeat-cover;background-image: url("@/static/images/my/jf-qb.png");}
  238. .jf-text{min-width: 60rpx;text-align: center;color: #fff;}
  239. }
  240. // tab页面
  241. .ezy-tab-border{
  242. flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;
  243. margin: 12rpx auto 32rpx;position: relative;box-sizing: border-box;display: flex;flex-direction: column;
  244. }
  245. .ezy-tab-box{
  246. height: 82rpx!important;
  247. background-color: rgba(255, 255, 255, 0.6);z-index: 3;margin: 20rpx 20rpx 0;
  248. box-sizing: border-box;padding: 10rpx 12rpx;border-radius: 8rpx;
  249. .segmented-control__text{color: #333!important;}
  250. .segmented-control__item--button,.segmented-control__item--button--last{height: 62rpx;border: 0;border-width: 0!important;border-radius: 8rpx;}
  251. .segmented-control__item--button--active .segmented-control__text{color: #fff!important;}
  252. }