<template>
  <page :total="total" :page-size="pageSize" :current="current"
        show-elevator v-on:on-change="listenPage"></page>
</template>

<script>
  import Page from 'iview/src/components/page'
  export default {
    props: {
      current: {
        default: 1
      },
      total: {
        default: 100
      },
      pageSize: {
        default: 10
      },
      showType: {
        default: 'show-elevator'
      }
    },
    methods: {
      listenPage: function (changedPage) {
        this.$emit('childEvent', changedPage)
      }
    },
    components: {
      Page
    }
  }
</script>

<style>
  a {
    color: #2d8cf0;
    background: 0 0;
    text-decoration: none;
    outline: 0;
    cursor: pointer;
    transition: color .2s ease;
  }
  .ivu-page-item-jump-next, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
    display: inline-block;
    vertical-align: middle;
    min-width: 32px;
    height: 32px;
    line-height: 30px;
    list-style: none;
    text-align: center;
    cursor: pointer;
    color: #666;
    font-family: Arial;
    border: 1px solid #dddee1;
    border-radius: 4px;
    transition: all .2s ease-in-out;
}
  .ivu-icon {
    display: inline-block;
    font-family: Ionicons;
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .ivu-icon-ios-arrow-left{
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .ivu-icon-ios-arrow-left:before{
    content: "\f060";
  }
  .ivu-icon-ios-arrow-right{
    display: inline-block;
    font: normal normal normal 14px/1 FontAwesome;
    font-size: inherit;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .ivu-icon-ios-arrow-right:before{
    content: "\f054";
  }
  .ivu-page-disabled:hover a {
    color: #ccc;
    cursor: not-allowed;
  }
  .ivu-page-next{
    content: '<';
  }
  .ivu-page-next, .ivu-page-prev {
    background-color: #fff;
  }
  .ivu-page-next a, .ivu-page-prev a {
    color: #666;
    font-size: 14px;
  }
  .ivu-icon {
    display: inline-block;
    font-family: Ionicons;
    speak: none;
    font-style: normal;
    font-weight: 400;
    font-variant: normal;
    text-transform: none;
    text-rendering: auto;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
  .ivu-page-item-active {
    background-color: #2d8cf0;
    border-color: #2d8cf0;
  }
  .ivu-page-item {
    display: inline-block;
    vertical-align: middle;
    min-width: 32px;
    height: 32px;
    line-height: 30px;
    margin-right: 4px;
    text-align: center;
    list-style: none;
    background-color: #fff;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: pointer;
    font-family: Arial;
    border: 1px solid #dddee1;
    border-radius: 4px;
    transition: border .2s ease-in-out,color .2s ease-in-out;
  }
  .ivu-page-item-active a {
    color: #fff;
  }
  .ivu-page-item a {
    margin: 0 6px;
    text-decoration: none;
    color: #495060;
  }
  .ivu-page-options {
    display: inline-block;
    vertical-align: middle;
    margin-left: 15px;
  }
  .ivu-page-options-elevator {
    display: inline-block;
    vertical-align: middle;
    height: 32px;
    line-height: 32px;
  }
  .ivu-page-options-elevator input {
    display: inline-block;
    width: 100%;
    height: 32px;
    line-height: 1.5;
    padding: 4px 7px;
    font-size: 12px;
    border: 1px solid #dddee1;
    color: #495060;
    background-color: #fff;
    background-image: none;
    position: relative;
    cursor: text;
    transition: border .2s ease-in-out,background .2s ease-in-out,box-shadow .2s ease-in-out;
    border-radius: 4px;
    margin: 0 8px;
    width: 50px;
  }



  .ivu-page{
    display: inline-block;
    padding-left: 0;
    margin: 20px 0;
    border-radius: 4px;
    float: right;
  }
  .ivu-page >li{
    margin: 0!important;
  }
  .ivu-page >li:hover{
    color: #23527c;
    background-color: #eee;
  }

  .ivu-page-item-jump-next, .ivu-page-item, .ivu-page-item-jump-prev, .ivu-page-next, .ivu-page-prev {
    width: 33.64px;
    height: 30.8px!important;
    font-family: normal!important;
    border: 1px solid #ddd!important;
    border-radius: 0px!important;
  }
  .ivu-page >li >a{
    color: #337ab7;
    font-size: 12px;
  }

  .ivu-page-item-active{
    background-color: #5078cb!important;
    border-color: #5078cb!important;
    cursor: default!important;
  }
  .ivu-page-item-active >a{
    color: #fff!important;
    cursor: default!important;
  }
  .ivu-page-options-elevator input {
    width: 33.64px!important;
    height: 30.8px!important;
    text-align: center;

  }

</style>
