pageComponent.vue 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 >li:hover{
  45. color: #23527c;
  46. background-color: #eee;
  47. }
  48. .ivu-page-item-jump-next, .ivu-page-item, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
  49. width: 33.64px;
  50. height: 30.8px!important;
  51. font-family: normal!important;
  52. border: 1px solid #ddd!important;
  53. border-radius: 0px!important;
  54. }
  55. .ivu-page >li >a{
  56. color: #337ab7;
  57. font-size: 12px;
  58. }
  59. .ivu-page-item-active{
  60. background-color: #5078cb!important;
  61. border-color: #5078cb!important;
  62. cursor: default!important;
  63. }
  64. .ivu-page-item-active >a{
  65. color: #fff!important;
  66. cursor: default!important;
  67. }
  68. .ivu-page-options-elevator input {
  69. width: 33.64px!important;
  70. height: 30.8px!important;
  71. text-align: center;
  72. }
  73. </style>