index.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. min-width: 100%;
  36. bottom: 0;
  37. left: 50%;
  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: translate(-50%, 100%);
  45. .select-option {
  46. height: 0;
  47. line-height: 25px;
  48. padding: 0 10px;
  49. border-bottom: 1px solid transparent;
  50. font-size: 12px;
  51. cursor: pointer;
  52. transition: all 0.3s;
  53. text-align: left;
  54. white-space: nowrap;
  55. }
  56. .select-option:hover {
  57. background: @theme_bg_color;
  58. }
  59. .select-option:last-child {
  60. border-bottom: none;
  61. }
  62. }
  63. .select-body.selected {
  64. opacity: 1;
  65. .select-option {
  66. height: auto;
  67. border-color: @line_color;
  68. }
  69. }
  70. .down-arrow {
  71. display: inline-block;
  72. position: relative;
  73. width: 16px;
  74. height: 16px;
  75. }
  76. .down-arrow::after {
  77. display: inline-block;
  78. content: " ";
  79. height: 8px;
  80. width: 8px;
  81. border-width: 2px 2px 0 0;
  82. border-color: #fff;
  83. border-style: solid;
  84. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  85. position: absolute;
  86. top: 50%;
  87. margin-top: -1px;
  88. }
  89. .up-arrow {
  90. display: inline-block;
  91. position: relative;
  92. width: 16px;
  93. height: 16px;
  94. }
  95. .up-arrow::after {
  96. display: inline-block;
  97. content: " ";
  98. height: 8px;
  99. width: 8px;
  100. border-width: 2px 2px 0 0;
  101. border-color: #fff;
  102. border-style: solid;
  103. transform: matrix(0.71, 0.71, -0.71, 0.71, 0, 0);
  104. position: absolute;
  105. top: 50%;
  106. margin-top: -1px;
  107. }
  108. &.white {
  109. cursor: pointer;
  110. .select-warp.active {
  111. background: rgba(241, 243, 246, 1);
  112. }
  113. .button {
  114. padding: 0 20px;
  115. border-radius: 0;
  116. background: none;
  117. color: #686872;
  118. }
  119. color: #686872;
  120. .select-body {
  121. border: none;
  122. }
  123. .select-option {
  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. text-align: center;
  167. line-height: 30px;
  168. border: none;
  169. }
  170. }
  171. }