common.scss 3.9 KB

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