<template>
  <div>
    <el-pagination
      v-show="pageData.total>=0"
      @size-change="changePageSize"
      @current-change="changePageNum"
      :current-page="pageData.pageNum"
      :page-sizes="[20,30,50,100,200]"
      :page-size="pageData.pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pageData.total"
    ></el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
     
    };
  },
  props: {
   pageData:Object,
  },
  mounted() {
    // this.pageData = this.pageData;
    // if (this.pageData.pageSize == 10) {
    //   this.paginationPageData.pageSize = 15;
    // }
  },
  methods: {
    changePageNum(val) {
      this.$emit("changePageNum", val);
    },
    changePageSize(val) {
      this.$emit("changePageSize", val);
    }
  },
  watch: {
    pageData: {
      deep: true,
      handler(newVal, oldVal) {
        this.$nextTick(() => {
          this.pageData = newVal;
        });
      }
    }
  }
};
</script>
<style>
  .el-pagination {
    float: right;
    margin-top:5px
  }
</style>