index.less 3.4 KB

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