common.scss 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318
  1. // 基础flex布局
  2. .uni-flex {
  3. display: flex;
  4. flex-direction: row;
  5. }
  6. .uni-flex-item {
  7. flex: 1;
  8. }
  9. .uni-row {
  10. flex-direction: row;
  11. }
  12. .uni-column {
  13. flex-direction: column;
  14. }
  15. // 高度填充
  16. .height-all {
  17. min-height: 100%;
  18. }
  19. // 公共区块样式
  20. .common-wrap {
  21. box-sizing: border-box;
  22. background: #fff;
  23. // margin: .15rem .2rem;
  24. // &:first-child {
  25. // margin-right: 0;
  26. // }
  27. // &:last-child {
  28. // margin-right: .14rem;
  29. // }
  30. }
  31. // 公共滚动条样式
  32. .common-scrollbar, .common-scrollbar .uni-scroll-view {
  33. &::-webkit-scrollbar {
  34. width: .06rem;
  35. height: .06rem;
  36. background-color: rgba($color: #000000, $alpha: 0);
  37. }
  38. &::-webkit-scrollbar-button {
  39. display: none;
  40. }
  41. &::-webkit-scrollbar-thumb {
  42. border-radius: .06rem;
  43. box-shadow: inset 0 0 .06rem rgba(45,43,43,.45);
  44. background-color: #ddd;
  45. }
  46. &::-webkit-scrollbar-track {
  47. background-color: transparent;
  48. }
  49. }
  50. // 公共头像样式
  51. .common-headimg {
  52. overflow: hidden;
  53. border-radius: 50%;
  54. image {
  55. width: 100%;
  56. }
  57. }
  58. // 公共tab切换
  59. .common-tab-wrap {
  60. height: .53rem;
  61. border-bottom: .01rem solid #E6E6E6;
  62. display: flex;
  63. padding: 0 .2rem;
  64. position: relative;
  65. .tab-item {
  66. height: .53rem;
  67. line-height: .53rem;
  68. padding: 0 .2rem;
  69. cursor: pointer;
  70. &:first-child {
  71. padding-left: 0;
  72. }
  73. &.active-bar {
  74. color: $primary-color;
  75. }
  76. }
  77. .active {
  78. position: absolute;
  79. width: 0;
  80. height: .03rem;
  81. border-radius: .03rem;
  82. background: $primary-color;
  83. bottom: -.01rem;
  84. left: 0;
  85. transition: transform .3s cubic-bezier(.645,.045,.355,1);
  86. }
  87. }
  88. // 公共表格操作样式
  89. .common-table-action {
  90. text {
  91. margin-left: .1rem;
  92. color: $primary-color;
  93. cursor: pointer;
  94. transition: all .3s;
  95. &:hover {
  96. color: rgba($color: $primary-color, $alpha: 0.6);
  97. }
  98. }
  99. }
  100. // 公共表格批量操作样式
  101. .common-table-batch {
  102. display: flex;
  103. button {
  104. width: auto!important;
  105. margin: .1rem 0 .1rem .1rem!important;
  106. font-size: .12rem;
  107. }
  108. }
  109. @mixin button {
  110. font-size: .14rem;
  111. transition: .1s;
  112. border-radius: .02rem;
  113. border-width: .01rem!important;
  114. &:after{
  115. border-radius: .02rem!important;
  116. }
  117. }
  118. // 主要按钮
  119. .primary-btn {
  120. @include button;
  121. background: $primary-color!important;
  122. color: #fff!important;
  123. &:hover {
  124. background-color: rgba($color: $primary-color, $alpha: 0.6)!important;
  125. }
  126. &[disabled] {
  127. background: rgba($color: $primary-color, $alpha: 0.6)!important;
  128. border-color: rgba($color: $primary-color, $alpha: 0.6)!important;
  129. color: #fff!important;
  130. &:hover {
  131. background: rgba($color: $primary-color, $alpha: 0.6)!important;
  132. border-color: rgba($color: $primary-color, $alpha: 0.6)!important;
  133. color: #fff!important;
  134. }
  135. }
  136. }
  137. // 默认按钮
  138. .default-btn {
  139. @include button;
  140. background: #fff!important;
  141. color: #606266!important;
  142. border-color: #606266!important;
  143. &:hover {
  144. color: $primary-color!important;
  145. border-color: $primary-color!important;
  146. }
  147. &:hover:after{
  148. border-color: $primary-color!important;
  149. }
  150. &[plain] {
  151. color: $primary-color!important;
  152. border-color: $primary-color!important;
  153. background-color: rgba($color: $primary-color, $alpha: 0.1)!important;
  154. &:after{
  155. border-color: $primary-color!important;
  156. }
  157. &:hover {
  158. background: $primary-color!important;
  159. color: #fff!important;
  160. }
  161. &[disabled] {
  162. color: #ddd!important;
  163. border-color: #e6e6e6!important;
  164. background: #f5f5f5!important;
  165. &:after{
  166. border-color: #e6e6e6!important;
  167. }
  168. &:hover {
  169. color: #ddd!important;
  170. border-color: #e6e6e6!important;
  171. }
  172. }
  173. }
  174. &[disabled] {
  175. color: #ddd!important;
  176. border-color: #e6e6e6!important;
  177. background: #f5f5f5!important;
  178. &:after{
  179. border-color: #e6e6e6!important;
  180. }
  181. &:hover {
  182. color: #ddd!important;
  183. border-color: #e6e6e6!important;
  184. }
  185. }
  186. }
  187. /* 公共数字键盘 */
  188. .keyboard-wrap {
  189. width: 5rem;
  190. margin-top: 0.2rem;
  191. display: flex;
  192. .num-wrap {
  193. flex: 1;
  194. width: 0;
  195. display: flex;
  196. flex-wrap: wrap;
  197. justify-content: center;
  198. .key-item {
  199. margin: 0.1rem 0.1rem 0 0;
  200. background: #f5f5f5;
  201. min-width: calc((100% - 0.3rem) / 3);
  202. text-align: center;
  203. padding: 0.15rem 0;
  204. border-radius: 0.05rem;
  205. font-size: 0.16rem;
  206. font-weight: bold;
  207. transtion: all 0.3s;
  208. cursor: pointer;
  209. &:hover {
  210. background: #ddd;
  211. }
  212. &.empty:hover {
  213. background: #f5f5f5;
  214. }
  215. }
  216. }
  217. .operation-wrap {
  218. display: flex;
  219. flex-direction: column;
  220. width: 1rem;
  221. .delete,
  222. .confirm {
  223. background: #f5f5f5;
  224. min-width: calc((100% - 0.3rem) / 3);
  225. text-align: center;
  226. padding: 0.15rem 0;
  227. margin-top: 0.1rem;
  228. border-radius: 0.05rem;
  229. font-size: 0.16rem;
  230. cursor: pointer;
  231. transtion: all 0.3s;
  232. &:hover {
  233. background: #ddd;
  234. }
  235. }
  236. .confirm {
  237. flex: 1;
  238. background: $primary-color;
  239. display: flex;
  240. justify-content: center;
  241. align-items: center;
  242. color: #fff;
  243. &:hover {
  244. background: rgba($color: $primary-color, $alpha: 0.9);
  245. }
  246. }
  247. }
  248. }
  249. /* 单行超出隐藏 */
  250. .using-hidden {
  251. word-break: break-all;
  252. text-overflow: ellipsis;
  253. overflow: hidden;
  254. display: -webkit-box;
  255. -webkit-line-clamp: 1;
  256. -webkit-box-orient: vertical;
  257. white-space: break-spaces;
  258. }
  259. /* 多行超出隐藏 */
  260. .multi-hidden {
  261. word-break: break-all;
  262. text-overflow: ellipsis;
  263. overflow: hidden;
  264. display: -webkit-box;
  265. -webkit-line-clamp: 2;
  266. -webkit-box-orient: vertical;
  267. }