pageComponent.vue 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. <template>
  2. <page :total="total" :page-size="pageSize" :current="current"
  3. show-elevator v-on:on-change="listenPage"></page>
  4. </template>
  5. <script>
  6. import Page from 'iview/src/components/page'
  7. import 'iview/dist/styles/iview.css'
  8. export default {
  9. props: {
  10. current: {
  11. default: 1
  12. },
  13. total: {
  14. default: 100
  15. },
  16. pageSize: {
  17. default: 10
  18. },
  19. showType: {
  20. default: 'show-elevator'
  21. }
  22. },
  23. methods: {
  24. listenPage: function (changedPage) {
  25. this.$emit('childEvent', changedPage)
  26. }
  27. },
  28. components: {
  29. Page
  30. }
  31. }
  32. </script>
  33. <style>
  34. .ivu-page{
  35. display: inline-block;
  36. padding-left: 0;
  37. margin: 20px 0;
  38. border-radius: 4px;
  39. float: right;
  40. }
  41. .ivu-page >li{
  42. margin: 0!important;
  43. }
  44. .ivu-page-item-jump-next, .ivu-page-item, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
  45. width: 33.64px;
  46. height: 30.8px!important;
  47. font-family: normal!important;
  48. border: 1px solid #ddd!important;
  49. border-radius: 0px!important;
  50. }
  51. .ivu-page >li >a{
  52. color: #337ab7;
  53. font-size: 12px;
  54. }
  55. .ivu-page-item-active{
  56. background-color: #5078cb!important;
  57. border-color: #5078cb!important;
  58. cursor: default!important;
  59. }
  60. .ivu-page-item-active >a{
  61. color: #fff!important;
  62. cursor: default!important;
  63. }
  64. .ivu-page-options-elevator input {
  65. width: 33.64px!important;
  66. height: 30.8px!important;
  67. text-align: center;
  68. }
  69. </style>