common.scss 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. // 设置页面属性
  2. page{
  3. background-color: #fff;
  4. color: #000;
  5. height: 100vh;
  6. }
  7. uni-toast,
  8. [longpressactions]{
  9. z-index: 99999!important;
  10. }
  11. .page_padding{
  12. padding-left: 24rpx;
  13. padding-right: 24rpx;
  14. }
  15. // 居中
  16. .text_center{
  17. text-align: center;
  18. }
  19. // 居左
  20. .text_left{
  21. text-align: left;
  22. }
  23. // 两端对齐
  24. .text_justify{
  25. text-align: justify;
  26. }
  27. // 按钮样式-绿色
  28. .primaryButton{
  29. color: #fff!important;
  30. background-color: $uni-primary!important;
  31. border-color: $uni-primary!important;
  32. }
  33. // 按钮样式-镂空-绿色
  34. .primaryPlainButton{
  35. color: $uni-primary!important;
  36. border-color: $uni-primary!important;
  37. margin: 0!important;
  38. }
  39. // 按钮样式-灰色
  40. .cancelButton{
  41. color: #fff!important;
  42. background-color: $uni-info!important;
  43. border-color: $uni-info!important;
  44. }
  45. // 底部按钮
  46. .foot_common_btns{
  47. width: 100%;
  48. box-sizing: border-box;
  49. padding: 24rpx;
  50. display: flex;
  51. align-items: center;
  52. gap: 24rpx;
  53. .btn{
  54. flex: 1;
  55. }
  56. }
  57. // 必填标识
  58. .required{
  59. color: #f00;
  60. font-size: 20rpx;
  61. }
  62. // flex:1
  63. .flex1{
  64. flex: 1;
  65. }
  66. // lable
  67. .label{
  68. margin-right: 35rpx;
  69. display: flex;
  70. align-items: center;
  71. font-size: 26rpx;
  72. }
  73. // easyinput边框选中色
  74. .is-focused{
  75. border-color: $uni-primary!important;
  76. }
  77. // 弹窗两端对齐
  78. .uni-modal__bd{
  79. text-align: justify;
  80. }
  81. // 按钮组
  82. .btns{
  83. display: flex;
  84. justify-content: space-between;
  85. align-items: center;
  86. padding-top: 24rpx;
  87. .btn{
  88. flex: 1;
  89. margin-right: 24rpx;
  90. &:last-of-type{
  91. margin-right: 0;
  92. }
  93. }
  94. }
  95. // 单行省略
  96. .ellipsis {
  97. white-space: nowrap; /* 确保文本在一行内显示 */
  98. overflow: hidden; /* 隐藏超出容器的文本 */
  99. text-overflow: ellipsis; /* 使用省略符号表示文本被截断 */
  100. }
  101. // 两行省略
  102. .ellipsis-multiline {
  103. display: -webkit-box;
  104. -webkit-box-orient: vertical;
  105. -webkit-line-clamp: 2; /* 定义显示的行数 */
  106. overflow: hidden;
  107. text-overflow: ellipsis;
  108. word-break: break-all;
  109. }
  110. // 透明
  111. .transparent{
  112. opacity: 0;
  113. }
  114. // 边框红色
  115. .formRed{
  116. .uni-select,
  117. .uni-easyinput__content,
  118. .uni-date-x,
  119. .uni-data-tree-input .input-value{
  120. border: 1px solid red!important;
  121. }
  122. }
  123. // 搜索框
  124. .uni-searchbar{
  125. padding: 0!important;
  126. width: 100%!important;
  127. }
  128. // 数字框
  129. .uni-numbox__value{
  130. background-color: #fff!important;
  131. color: #000!important;
  132. border: 1px solid #E5E5E5!important;
  133. margin-left: 20rpx!important;
  134. margin-right: 20rpx!important;
  135. }
  136. // 多选框
  137. .uni-data-checklist .checklist-group .checklist-box.is--list{
  138. padding: 24rpx!important;
  139. font-size: 26rpx!important;
  140. }
  141. .uni-data-checklist .checklist-group .checklist-box.is--list .checklist-content .checklist-text{
  142. margin-left: 0!important;
  143. margin-right: 24rpx!important;
  144. flex: 1!important;
  145. }
  146. .uni-data-checklist .checklist-group .checklist-box.is--list{
  147. border-top: none!important;
  148. border-bottom: 1rpx solid #DEDEDE!important;
  149. }
  150. // 清除按钮
  151. .content-clear-icon{
  152. color: $uni-primary!important;
  153. }
  154. // flex1
  155. .flex1{
  156. flex: 1;
  157. }
  158. // 表格控件遮罩
  159. .formMask{
  160. position: relative;
  161. &:after{
  162. content: '';
  163. position: absolute;
  164. top: 0;
  165. right: 0;
  166. bottom: 0;
  167. left: 0;
  168. }
  169. }
  170. // 下拉框
  171. .uni-select__input-box{
  172. width: 100%!important;
  173. }
  174. // 数据组合框
  175. .uni-data-checklist .checklist-group .checklist-box.is--list.is-checked .checklist-content .checkobx__list{
  176. border-color: $uni-primary!important;
  177. }
  178. // 外边距-top
  179. .mt0{
  180. margin-top: 0!important;
  181. }
  182. .no-scroll{
  183. overflow-y: hidden;
  184. }
  185. .view-body{
  186. overflow-y: scroll;
  187. }