<template>
  <div>
    <el-pagination  background
      align="right"
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="pageSizes"
      :page-size="pageSize"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
      class="mt10"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  components: {},
  props: {
    currentPage: {
      type: Number, //类型
      required: true, //是否必须传入
    },
    pageSizes: {
      type: [Array, Object],
      required: true,
    },
    pageSize: {
      type: Number,
      required: true,
    },
    total: {
      type: Number,
      required: true,
    },
  },
  data() {
    return {
      
    };
  },
  created() {},

  mounted() {
  },

  methods: {
     //每页条数改变时触发 选择一页显示多少行
    handleSizeChange(val) {
      this.$emit("handleSizeChange", val);
    },
    //当前页改变时触发 跳转其他页
    handleCurrentChange(val) {
      this.$emit("handleCurrentChange", val);
    },
  },

  computed: {},

  watch: {},
};
</script>

<style lang="less" scoped>
@import url("../../../styles/comStyle.less");
</style>
