index.less 3.3 KB

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