<template>
	<!-- 分页组件 -->
	<el-pagination
		:page-sizes="[10, 25, 50, 100]"
		:small="pageable.small"
		:disabled="pageable.disabled"
		:background="pageable.background"
		layout="total, sizes, prev, pager, next, jumper"
		:total="pageable.total"
		@size-change="handleSizeChange"
		@current-change="handleCurrentChange"
	></el-pagination>
</template>

<script setup lang="ts" name="Pagination">
interface Pageable {
	pageNo: number;
	pageSize: number;
	total: number;
	small?: boolean;
	disabled?: boolean;
	background?: boolean;
}

interface PaginationProps {
	pageable: Pageable;
	handleSizeChange: (size: number) => void;
	handleCurrentChange: (currentPage: number) => void;
}

defineProps<PaginationProps>();
</script>
