pageComponent.vue 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div style="float: right; margin: 30px 0;">
  3. <el-pagination
  4. :current-page.sync="current"
  5. :page-size="pageSize"
  6. layout="prev, pager, next, jumper"
  7. :total="total"
  8. @current-change="handleCurrentChange"
  9. v-if="total/pageSize>=1">
  10. </el-pagination>
  11. </div>
  12. </template>
  13. <script>
  14. export default {
  15. props: ['current', 'total', 'pageSize'],
  16. methods: {
  17. handleCurrentChange: function (changedPage) {
  18. this.$emit('childEvent', changedPage)
  19. }
  20. }
  21. }
  22. </script>
  23. <style>
  24. a {
  25. color: #2d8cf0;
  26. background: 0 0;
  27. text-decoration: none;
  28. outline: 0;
  29. cursor: pointer;
  30. transition: color .2s ease;
  31. }
  32. .el-pagination .btn-next, .el-pagination .btn-prev {
  33. color: #337ab7;
  34. }
  35. .el-pager li{
  36. color: #337ab7;
  37. text-decoration: none;
  38. background-color: #fff;
  39. border: 1px solid #ddd;
  40. font-size: 10px;
  41. }
  42. .el-pager li:not(.active):hover, .el-pagination button:hover {
  43. z-index: 3;
  44. color: #23527c;
  45. background-color: #eee;
  46. border-color: #ddd;
  47. }
  48. .el-pager li.active {
  49. background: #5078cb!important;
  50. }
  51. .el-icon-arrow-left:before {
  52. content: "\f100";
  53. font-family: FontAwesome;
  54. }
  55. .el-icon-arrow-right:before {
  56. content: "\f101";
  57. font-family: FontAwesome;
  58. }
  59. .el-pagination button.disabled {
  60. color: #337ab7;
  61. background-color: #fff;
  62. cursor: not-allowed;
  63. }
  64. </style>