You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.1 KiB

2 years ago
  1. <template>
  2. <div>
  3. <v-pagination v-model="page" :length="pageLength"
  4. :next-icon="page === pageLength || pageLength === 0 ? '' : '$next'" :prev-icon="page === 1 ? '' : '$prev'"
  5. total-visible="5" circle></v-pagination>
  6. </div>
  7. </template>
  8. <script>
  9. export default {
  10. props: {
  11. pageLength: {
  12. type: Number,
  13. required: true,
  14. default: 1,
  15. },
  16. },
  17. data() {
  18. return {
  19. page: 1,
  20. };
  21. },
  22. watch: {
  23. page: {
  24. handler: function () {
  25. this.$emit("update", this.page);
  26. },
  27. },
  28. pageLength: {
  29. handler: function () {
  30. if (this.pageLength === 1) {
  31. this.page = 1;
  32. }
  33. },
  34. },
  35. },
  36. methods: {},
  37. };
  38. </script>
  39. <style lang="scss" scoped>
  40. :deep() {
  41. ul>li {
  42. button {
  43. -webkit-box-shadow: none;
  44. -moz-box-shadow: none;
  45. box-shadow: none;
  46. border: none;
  47. color: #f48800 !important;
  48. i {
  49. color: #f48800 !important;
  50. }
  51. }
  52. .v-pagination__item--active {
  53. color: white !important;
  54. }
  55. .v-pagination__more {
  56. color: #f48800 !important;
  57. }
  58. }
  59. }
  60. </style>