index.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <template>
  2. <el-pagination
  3. background
  4. layout="total, prev, pager, next, sizes, jumper"
  5. :page-size="paginationData.pageSize"
  6. :page-sizes="paginationData.pageSizes"
  7. :pager-count="paginationData.pagerCount"
  8. :total="paginationData.total"
  9. :current-page="paginationData.currentPage"
  10. @current-change="paginationData.currentChange"
  11. @size-change="paginationData.handleSizeChange"
  12. ></el-pagination>
  13. </template>
  14. <script>
  15. /**
  16. * 分页组件
  17. * page-size -- 每页显示条目个数,支持 .sync 修饰符;
  18. * pager-count -- 页码按钮的数量,当总页数超过该值时会折叠;
  19. * total -- 总条目数;
  20. * current-page -- 当前页数,支持 .sync 修饰符;
  21. * current-change -- currentPage 改变时会触发;
  22. * size-change -- handleSizeChange 切换条数时触发;
  23. */
  24. export default {
  25. name: "page",
  26. props: ["paginationData"],
  27. methods: {},
  28. };
  29. </script>
  30. <style lang="less" scoped>
  31. .el-pagination {
  32. position: relative;
  33. top: 10px;
  34. float: right;
  35. /deep/.el-pager li:not(.disabled).active {
  36. background-color: #2ea8e6;
  37. }
  38. /deep/.el-pagination__jump {
  39. margin-left: 0;
  40. }
  41. /deep/.btn-prev {
  42. border-radius: 5px;
  43. }
  44. /deep/.btn-next {
  45. border-radius: 5px;
  46. }
  47. /deep/ .el-pager li {
  48. border-radius: 5px;
  49. background: rgba(99, 165, 164, 0.1);
  50. }
  51. }
  52. </style>