<template>
  <el-pagination
    layout="total,sizes ,prev, pager, next,jumper"
    :page-size="pagination.rowsPerPage"
    :current-page="pagination.page"
    :total="pagination.total"
    :page-sizes="[15, 30, 50]"
    @current-change="handleCurrentChange"
    @size-change="handleSizeChange"
  ></el-pagination>
</template>

<script setup>
  import { defineProps, defineEmits } from 'vue'
  let props = defineProps({
    pagination: {
      type: Object,
      default() {
        return {
          rowsPerPage: 15,
          page: 1,
          total: 0,
        }
      },
    }, // 表格数据
  })
  const emits = defineEmits(['current', 'sizechange'])

  const handleCurrentChange = (val) => {
    emits('current', val)
  }
  const handleSizeChange = (val) => {
    emits('sizechange', val)
  }
</script>
