pagination.scss 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. @import "mixins/mixins";
  2. @import "mixins/utils";
  3. @import "common/var";
  4. @import "select";
  5. @include b(pagination) {
  6. white-space: nowrap;
  7. padding: 2px 5px;
  8. color: $--pagination-color;
  9. font-weight: bold;
  10. @include utils-clearfix;
  11. span:not([class*=suffix]),
  12. button {
  13. display: inline-block;
  14. font-size: $--pagination-font-size;
  15. min-width: $--pagination-button-width;
  16. height: $--pagination-button-height;
  17. line-height: $--pagination-button-height;
  18. vertical-align: top;
  19. box-sizing: border-box;
  20. }
  21. .el-input__inner {
  22. text-align: center;
  23. -moz-appearance: textfield;
  24. }
  25. // pagesize 的下拉 icon
  26. .el-input__suffix {
  27. right: 0;
  28. transform: scale(.8);
  29. }
  30. .el-select .el-input {
  31. width: 100px;
  32. margin: 0 5px;
  33. .el-input__inner {
  34. padding-right: 25px;
  35. border-radius: $--pagination-border-radius;
  36. height: $--pagination-button-height;
  37. }
  38. }
  39. button {
  40. border: none;
  41. padding: 0 6px;
  42. background: transparent;
  43. &:focus {
  44. outline: none;
  45. }
  46. &:hover {
  47. color: $--pagination-hover-fill;
  48. }
  49. &.disabled {
  50. color: $--pagination-button-disabled-color;
  51. background-color: $--pagination-button-disabled-fill;
  52. cursor: not-allowed;
  53. }
  54. }
  55. .btn-prev,
  56. .btn-next {
  57. background: center center no-repeat;
  58. background-size: 16px;
  59. background-color: $--pagination-fill;
  60. cursor: pointer;
  61. margin: 0;
  62. color: $--pagination-button-color;
  63. .el-icon {
  64. display: block;
  65. font-size: 12px;
  66. font-weight: bold;
  67. }
  68. }
  69. .btn-prev {
  70. padding-right: 12px;
  71. }
  72. .btn-next {
  73. padding-left: 12px;
  74. }
  75. .el-pager li.disabled {
  76. color: $--color-text-placeholder;
  77. cursor: not-allowed;
  78. }
  79. @include m(small) {
  80. .btn-prev,
  81. .btn-next,
  82. .el-pager li,
  83. .el-pager li:last-child {
  84. border-color: transparent;
  85. font-size: 12px;
  86. line-height: 22px;
  87. height: 22px;
  88. min-width: 22px;
  89. }
  90. .arrow.disabled {
  91. visibility: hidden;
  92. }
  93. }
  94. @include e(sizes) {
  95. margin: 0 10px 0 0;
  96. font-weight: normal;
  97. color: $--color-text-regular;
  98. .el-input .el-input__inner {
  99. font-size: $--pagination-font-size;
  100. padding-left: 8px;
  101. &:hover {
  102. border-color: $--pagination-hover-fill;
  103. }
  104. }
  105. }
  106. @include e(total) {
  107. margin-right: 10px;
  108. font-weight: normal;
  109. color: $--color-text-regular;
  110. }
  111. @include e(jump) {
  112. margin-left: 24px;
  113. font-weight: normal;
  114. color: $--color-text-regular;
  115. .el-input__inner {
  116. padding: 0 3px;
  117. }
  118. }
  119. @include e(rightwrapper) {
  120. float: right;
  121. }
  122. @include e(editor) {
  123. line-height: 18px;
  124. padding: 0 2px;
  125. height: $--pagination-button-height;
  126. text-align: center;
  127. margin: 0 2px;
  128. box-sizing: border-box;
  129. border-radius: $--pagination-border-radius;
  130. &.el-input {
  131. width: 50px;
  132. }
  133. &.el-input .el-input__inner {
  134. height: $--pagination-button-height;
  135. }
  136. .el-input__inner::-webkit-inner-spin-button,
  137. .el-input__inner::-webkit-outer-spin-button {
  138. -webkit-appearance: none;
  139. margin: 0;
  140. }
  141. }
  142. @include when(background) {
  143. .btn-prev,
  144. .btn-next,
  145. .el-pager li {
  146. margin: 0 5px;
  147. background-color: $--color-info-lighter;
  148. color: $--color-text-regular;
  149. min-width: 30px;
  150. border-radius: 2px;
  151. &.disabled {
  152. color: $--color-text-placeholder;
  153. }
  154. }
  155. .btn-prev, .btn-next {
  156. padding: 0;
  157. &.disabled {
  158. color: $--color-text-placeholder;
  159. }
  160. }
  161. .el-pager li:not(.disabled) {
  162. &:hover {
  163. color: $--pagination-hover-fill;
  164. }
  165. &.active {
  166. background-color: $--color-primary;
  167. color: $--color-white;
  168. }
  169. }
  170. &.el-pagination--small {
  171. .btn-prev,
  172. .btn-next,
  173. .el-pager li {
  174. margin: 0 3px;
  175. min-width: 22px;
  176. }
  177. }
  178. }
  179. }
  180. @include b(pager) {
  181. user-select: none;
  182. list-style: none;
  183. display: inline-block;
  184. vertical-align: top;
  185. font-size: 0;
  186. padding: 0;
  187. margin: 0;
  188. .more::before {
  189. line-height: 30px;
  190. }
  191. li {
  192. padding: 0 4px;
  193. background: $--pagination-fill;
  194. vertical-align: top;
  195. display: inline-block;
  196. font-size: $--pagination-font-size;
  197. min-width: $--pagination-button-width;
  198. height: $--pagination-button-height;
  199. line-height: $--pagination-button-height;
  200. cursor: pointer;
  201. box-sizing: border-box;
  202. text-align: center;
  203. margin: 0;
  204. &.btn-quicknext,
  205. &.btn-quickprev {
  206. line-height: 28px;
  207. color: $--pagination-button-color;
  208. &.disabled {
  209. color: $--color-text-placeholder;
  210. }
  211. }
  212. &.btn-quickprev:hover {
  213. cursor: pointer;
  214. }
  215. &.btn-quicknext:hover {
  216. cursor: pointer;
  217. }
  218. &.active + li {
  219. border-left: 0;
  220. }
  221. &:hover {
  222. color: $--pagination-hover-fill;
  223. }
  224. &.active {
  225. color: $--pagination-hover-fill;
  226. cursor: default;
  227. }
  228. }
  229. }