components.scss 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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;
  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{
  74. font-size: 36rpx;color: #fff;
  75. }
  76. .nav-bar-other{
  77. font-size: 30rpx;color: #fff;
  78. .key-note{color: #ffff01;}
  79. }
  80. }
  81. // 两个元素
  82. .icon-title-navBar-box{
  83. display: flex;align-items: center;justify-content: center;
  84. padding: 0 20rpx 20rpx;box-sizing: border-box;position: relative;
  85. .nav-bar-title{
  86. font-size: 36rpx;height: 63rpx;line-height: 63rpx;color: #fff;max-width: 70%;
  87. }
  88. .nav-bar-icon{
  89. width: 24rpx;height: 38rpx;position: absolute;left: 24rpx;top: 12rpx;
  90. background-image: url("@/static/images/common/navBar-return-btn.png");@include ezy-no-repeat-cover();
  91. }
  92. }
  93. /***** 试题---题干 *****/
  94. .ezy-shiti-question{
  95. margin: 24rpx 0 42rpx;font-size: 32rpx;color: #333;line-height: 1.6;padding: 0 10rpx;box-sizing: border-box;
  96. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;@include ezy-rich-text;
  97. }
  98. /***** 单选题 *****/
  99. .ezy-danxuan-box{
  100. margin: 0 10rpx;
  101. .danxuan-title{
  102. width: 231rpx;height: 63rpx;
  103. background-image: url("@/static/images/exam/danxuan-title.png");@include ezy-no-repeat-cover();
  104. }
  105. .danxuan-option-box{
  106. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  107. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 10rpx 24rpx;
  108. display: flex;
  109. .option-change{flex-shrink: 0;line-height: 1.6;}
  110. .option-question{font-size: 32rpx;line-height: 1.6;margin-left: 6rpx;@include ezy-rich-text;
  111. text-align: justify;word-wrap: break-word;word-break: break-all;display: block;}
  112. }
  113. .danxuan-option-box.active{color: #0589e9;}
  114. .danxuan-option-box.showError{color: #ff5757;}
  115. .danxuan-option-box.active_right{color: #1ac136;}
  116. }
  117. /***** 判断题 *****/
  118. .ezy-panduan-box{
  119. margin: 0 10rpx;
  120. .panduan-title{
  121. width: 231rpx;height: 63rpx;
  122. background-image: url("@/static/images/exam/panduan-title.png");@include ezy-no-repeat-cover();
  123. }
  124. .danxuan-option-box{
  125. width: 100%;line-height:96rpx;border-radius: 8px;margin-bottom: 20rpx;
  126. font-size: 32rpx;color: #333;box-sizing: border-box;padding: 10rpx 24rpx;
  127. }
  128. .uni-radio-input{
  129. width: 56rpx;height: 56rpx;border: 0;@include ezy-no-repeat-cover();
  130. background-image: url("@/static/images/exam/option-bj.png");}
  131. .option-question{display: flex;}
  132. .option-question.active .uni-radio-input{
  133. background-image: url("@/static/images/exam/option-active-img.png");
  134. background-color: transparent!important;
  135. svg{display: none;}
  136. }
  137. .option-question.showError .uni-radio-input{
  138. background-image: url("@/static/images/exam/option-error-img.png");
  139. background-color: transparent!important;
  140. svg{display: none;}
  141. }
  142. .option-question.active_right .uni-radio-input{
  143. background-image: url("@/static/images/exam/option-right-img.png");
  144. background-color: transparent!important;
  145. svg{display: none;}
  146. }
  147. }
  148. /***** 填空题 *****/
  149. .ezy-tiankong-box{
  150. .tiankongn-title{
  151. width: 231rpx;height: 63rpx;
  152. background-image: url("@/static/images/exam/panduan-title.png");@include ezy-no-repeat-cover;
  153. }
  154. .tiankong-input {width: 50px;height: 32rpx;border: 1px solid #999;}
  155. .tk-input-box{display: inline-block;position: relative;font-size: 0;}
  156. .tiankong-input{text-align: center;}
  157. .tiankong-input.showError{color: #ff5757;}
  158. .tiankong-input.active_right{color: green;}
  159. .tk-input-box.showError::after{
  160. content: '';width: 30rpx;height: 30rpx;display: block;position: absolute;top: -12rpx;right: -6rpx;
  161. background-image: url("@/static/images/exam/option-error-img.png");@include ezy-no-repeat-cover;
  162. }
  163. .tk-input-box.active_right::after{
  164. content: '';width: 30rpx;height: 30rpx;display: block;position: absolute;top: -12rpx;right: -6rpx;
  165. background-image: url("@/static/images/exam/option-right-img.png");@include ezy-no-repeat-cover;
  166. }
  167. .ezy-shiti-question li{margin: 20rpx 0;}
  168. }
  169. /***** 试题白色的框 *****/
  170. .shiti-frame-box{
  171. flex: 1;width: 92%;height: auto;background-color: rgba(255, 255, 255, 0.6);border-radius: 10px;
  172. margin: 12rpx auto 32rpx;position: relative;padding: 10% 0 6%;box-sizing: border-box;display: flex;flex-direction: column;
  173. }
  174. .shiti-frame-box::before{
  175. content: "";display: block;background-color: rgba(255, 255, 255, 0.6);border-radius: 0 0 10rpx 10rpx;
  176. position: absolute;top: 20rpx;left: 20rpx;right: 20rpx;bottom: 30rpx;z-index: 1;
  177. }
  178. /***** 模拟标题栏 *****/
  179. .ezy-title-bar {
  180. height: calc(44px + env(safe-area-inset-top));
  181. position: fixed;top: var(--status-bar-height);left: var(--window-left);right: var(--window-right);
  182. background-color: rgb(248, 248, 248);color: rgb(0, 0, 0);box-sizing: border-box;
  183. display: flex;align-items: center;justify-content: center;overflow: hidden;z-index: 998;
  184. }
  185. // 小的提示弹窗
  186. .ezy-tip-dialog{
  187. .tip-content-box{@include ezy-no-repeat-cover;box-sizing: border-box;text-align:center;}
  188. .tip-title{
  189. color: #343434;font-size: 38rpx;margin-bottom: 24rpx;
  190. }
  191. .tip-content{
  192. color: #666;font-size: 32rpx;padding-bottom: 42rpx;
  193. border-bottom: 1px dashed #70cbf4;line-height: 1.6;
  194. }
  195. .tip-btn-box{
  196. width: 100%;display: flex;justify-content: space-between;
  197. .not-confirm-btn,.confirm-btn{
  198. width: 208rpx;height: 83rpx;@include ezy-no-repeat-cover;margin: 30rpx 32rpx 0;
  199. }
  200. .not-confirm-btn{background-image: url("@/static/images/common/tip-cancel-btn.png");}
  201. .confirm-btn{background-image: url("@/static/images/common/tip-confirm-btn.png");}
  202. }
  203. }
  204. .tip-small-dialog{
  205. .tip-content-box{
  206. width: 625rpx;height: 365rpx;padding: 42rpx 48rpx;
  207. background-image: url("@/static/images/common/tip-small-bj.png");
  208. }
  209. }
  210. .tip-middle-dialog{
  211. .tip-content-box{
  212. width: 625rpx;height: 423rpx;padding: 42rpx 48rpx;
  213. background-image: url("@/static/images/common/tip-middle-bj.png");
  214. }
  215. }
  216. .tip-big-dialog{
  217. .tip-content-box{
  218. width: 625rpx;height: 519rpx;padding: 42rpx 48rpx;
  219. background-image: url("@/static/images/common/tip-big-bj.png");
  220. }
  221. .tip-content{min-height: 240rpx;text-align: justify;}
  222. }