pageComponent.vue 1.2 KB

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