Pagination.vue 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <template>
  2. <v-pagination
  3. :style="cssVars"
  4. :value="value"
  5. :length="length"
  6. :total-visible="visible"
  7. next-icon="Вперед"
  8. prev-icon="Назад"
  9. next-aria-label="next-text"
  10. previous-aria-label="prev-text"
  11. page-aria-label="page-text"
  12. current-page-aria-label="current-page"
  13. @input="$emit('input', $event)"
  14. >
  15. </v-pagination>
  16. </template>
  17. <script>
  18. export default {
  19. props: {
  20. value: {
  21. type: [String, Number],
  22. default: 1,
  23. },
  24. length: {
  25. type: [String, Number],
  26. default: 10,
  27. },
  28. visible: {
  29. type: [String, Number],
  30. default: 20,
  31. },
  32. dark: {
  33. type: Boolean,
  34. default: false,
  35. },
  36. align: {
  37. type: String,
  38. default: "center",
  39. },
  40. },
  41. computed: {
  42. cssVars() {
  43. return {
  44. "--bg-color": this.dark ? "#1E1E1E" : "rgba(59, 85, 115, .08)",
  45. "--color": this.dark ? "#FFFFFF" : "#3B5573",
  46. "--align": this.align
  47. };
  48. },
  49. },
  50. };
  51. </script>
  52. <style lang="less" scoped>
  53. ::v-deep button {
  54. width: 41px !important;
  55. height: 41px !important;
  56. outline: none !important;
  57. box-shadow: none !important;
  58. border-radius: 11px !important;
  59. color: var(--color) !important;
  60. user-select: none !important;
  61. i {
  62. font: 14px/1 "Golos Text" !important;
  63. color: var(--color) !important;
  64. }
  65. }
  66. ::v-deep button[aria-label="prev-text"],
  67. ::v-deep button[aria-label="next-text"] {
  68. width: 100px !important;
  69. background-color: var(--bg-color) !important;
  70. color: #3b5573 !important;
  71. }
  72. ::v-deep button[aria-label="current-page"] {
  73. background-color: var(--bg-color) !important;
  74. }
  75. ::v-deep button[aria-label="page-text"] {
  76. background-color: transparent !important;
  77. }
  78. ::v-deep .v-pagination {
  79. justify-content: var(--align);
  80. &__more {
  81. color: var(--color) !important;
  82. user-select: none;
  83. }
  84. }
  85. </style>