<template>
  <el-pagination
    background
    small
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
    :current-page="currentPage"
    :page-size="pageSize"
    :pager-count="11"
    layout="total, prev, pager, next, jumper"
    :total="total">
  </el-pagination>
</template>

<script>
export default {
  name: 'Pagination',
  data() {
    return {
    };
  },
  props: {
    total: {
      default() {
        return 0
      }
    },
    pageSize: {
      default() {
        return 10
      }
    },
    currentPage: {
      default() {
        return 1
      }
    }
  },
  computed:{
  },
  watch:{
  },
  methods: {
    handleSizeChange(val) {
      // console.log(`每页 ${val} 条`);
      // this.param.content.pageSize = val
      // this.listData()
    },
    async handleCurrentChange(val) {
      // console.log(`当前页: ${val}`);
      this.$emit('pageChange',val)
    },
  },
};
</script>

<style scoped>
  .el-pagination {
    margin-bottom: 16px;
  }
</style>
