<template>
  <div style="margin-top: 10px;">
    <el-pagination background :page-size="props.pagingConfig.pageSize" :page-sizes="[10, 20, 30, 40]"
      layout="prev,pager,next,jumper,total,sizes" v-model:current-page="props.pagingConfig.pageNumber"
      :total="props.pagingConfig.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
  </div>
</template>
<script setup>
const props = defineProps({
  pagingConfig: {
    type: Object,
    default: () => { }
  }
})
const emit = defineEmits(['sizeChange', 'currentChange'])
// 当前条改变
function handleSizeChange(val) {
  emit('sizeChange', val)
}
// 当前页改变
function handleCurrentChange(val) {
  emit('currentChange', val)
}
</script>