index.less 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  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: 50%;
  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: translate(-50%, 100%);
  44. .select-option {
  45. height: 0;
  46. line-height: 25px;
  47. padding: 0 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. padding: 0 20px;
  113. border-radius: 0;
  114. background: none;
  115. color: #686872;
  116. }
  117. color: #686872;
  118. .select-body {
  119. border: none;
  120. }
  121. .select-option {
  122. text-align: center;
  123. border: none;
  124. }
  125. }
  126. .up-arrow::after {
  127. width: auto;
  128. height: auto;
  129. border-width: 5px;
  130. border-color: transparent transparent #8897a8 transparent;
  131. border-style: solid;
  132. transform: translateY(-4px);
  133. }
  134. .down-arrow::after {
  135. width: auto;
  136. height: auto;
  137. border-width: 5px;
  138. border-color: #8897a8 transparent transparent transparent;
  139. border-style: solid;
  140. transform: translateY(2px);
  141. }
  142. &.default {
  143. cursor: pointer;
  144. .up-arrow::after {
  145. width: auto;
  146. height: auto;
  147. border-width: 5px;
  148. border-color: transparent transparent #8897a8 transparent;
  149. border-style: solid;
  150. transform: translateY(-4px);
  151. }
  152. .down-arrow::after {
  153. width: auto;
  154. height: auto;
  155. border-width: 5px;
  156. border-color: #8897a8 transparent transparent transparent;
  157. border-style: solid;
  158. transform: translateY(2px);
  159. }
  160. .select-body {
  161. border: none;
  162. }
  163. .select-option {
  164. text-align: center;
  165. line-height: 30px;
  166. border: none;
  167. }
  168. }
  169. }