common.scss 4.0 KB

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