index.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  1. @import '../../app.less';
  2. .select.small {
  3. .select-warp {
  4. line-height: 22px;
  5. .button {
  6. line-height: 22px;
  7. padding: 0 14px;
  8. }
  9. }
  10. }
  11. .select.basic {
  12. .select-warp {
  13. line-height: 30px;
  14. }
  15. }
  16. .select {
  17. position: relative;
  18. text-align: center;
  19. .mask {
  20. position: fixed;
  21. top: 0;
  22. left: 0;
  23. right: 0;
  24. bottom: 0;
  25. z-index: 1;
  26. }
  27. .select-warp {
  28. position: relative;
  29. text-align: center;
  30. }
  31. .select-body {
  32. overflow: hidden;
  33. position: absolute;
  34. bottom: 0;
  35. left: 0;
  36. right: 0;
  37. background: #fff;
  38. border: 1px solid @line_color;
  39. border-radius: 4px;
  40. box-sizing: border-box;
  41. opacity: 0;
  42. z-index: 2;
  43. transform: translateY(100%);
  44. .select-option {
  45. height: 0;
  46. line-height: 25px;
  47. padding-left: 10px;
  48. border-bottom: 1px solid transparent;
  49. font-size: 12px;
  50. cursor: pointer;
  51. transition: all 0.3s;
  52. text-align: left;
  53. }
  54. .select-option:hover {
  55. background: @theme_bg_color;
  56. }
  57. .select-option:last-child {
  58. border-bottom: none;
  59. }
  60. }
  61. .select-body.selected {
  62. opacity: 1;
  63. .select-option {
  64. height: auto;
  65. border-color: @line_color;
  66. }
  67. }
  68. .down-arrow {
  69. display: inline-block;
  70. position: relative;
  71. width: 16px;
  72. height: 16px;
  73. }
  74. .down-arrow::after {
  75. display: inline-block;
  76. content: " ";
  77. height: 8px;
  78. width: 8px;
  79. border-width: 2px 2px 0 0;
  80. border-color: #fff;
  81. border-style: solid;
  82. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  83. position: absolute;
  84. top: 50%;
  85. margin-top: -1px;
  86. }
  87. .up-arrow {
  88. display: inline-block;
  89. position: relative;
  90. width: 16px;
  91. height: 16px;
  92. }
  93. .up-arrow::after {
  94. display: inline-block;
  95. content: " ";
  96. height: 8px;
  97. width: 8px;
  98. border-width: 2px 2px 0 0;
  99. border-color: #fff;
  100. border-style: solid;
  101. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  102. position: absolute;
  103. top: 50%;
  104. margin-top: -1px;
  105. }
  106. &.white {
  107. cursor: pointer;
  108. .select-warp.active {
  109. background: rgba(241, 243, 246, 1);
  110. }
  111. .button {
  112. width: 98px;
  113. padding: 0px;
  114. border-radius: 0;
  115. background: none;
  116. color: #686872;
  117. }
  118. .up-arrow {
  119. display: none;
  120. }
  121. .down-arrow {
  122. display: none;
  123. }
  124. color: #686872;
  125. .select-body {
  126. border: none;
  127. }
  128. .select-option {
  129. padding: 0;
  130. text-align: center;
  131. border: none;
  132. }
  133. }
  134. .up-arrow::after {
  135. display: inline-block;
  136. content: " ";
  137. height: 8px;
  138. width: 8px;
  139. border-width: 2px 2px 0 0;
  140. border-color: #fff;
  141. border-style: solid;
  142. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  143. position: absolute;
  144. top: 50%;
  145. margin-top: -1px;
  146. }
  147. &.default {
  148. cursor: pointer;
  149. .up-arrow::after {
  150. width: auto;
  151. height: auto;
  152. border-width: 5px;
  153. border-color: transparent transparent #8897a8 transparent;
  154. border-style: solid;
  155. transform: translateY(-4px);
  156. }
  157. .down-arrow::after {
  158. width: auto;
  159. height: auto;
  160. border-width: 5px;
  161. border-color: #8897a8 transparent transparent transparent;
  162. border-style: solid;
  163. transform: translateY(2px);
  164. }
  165. .select-body {
  166. border: none;
  167. }
  168. .select-option {
  169. padding: 0;
  170. text-align: center;
  171. line-height: 30px;
  172. border: none;
  173. }
  174. }
  175. }