<template>
			<!-- 分页设置-->
			<div v-show="count > 0" style="width: 100%">
				<el-divider></el-divider>
				<el-pagination background :total="count" v-model:current-page="queryParams.pageNum"
					v-model:page-size="queryParams.pageSize" :page-sizes="[10, 100, 200, 300, 500, 1000]"
					layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange"
					@current-change="handleCurrentChange" />
			</div>
</template>

<script lang="ts" setup >
import {  onMounted, getCurrentInstance, onUnmounted,  } from 'vue';
const { proxy } = getCurrentInstance() as any;
const props = defineProps({
	// 总条数
	count: {
		type: Number,
		default: 0,
	},
  queryParams: {
		type: Object,
		default: () => {
			return {
				pageNum: 1,
				pageSize: 10,
			};
		},	
  }
});


const emit = defineEmits(['handleCurrentChange',"handleSizeChange"]);

const handleCurrentChange = (val: number) => {
	emit('handleCurrentChange', val);
};
const handleSizeChange = (val: number) => {
	emit('handleSizeChange', val);
};




// 页面加载时
onMounted(() => { });
// 页面卸载时
onUnmounted(() => {
});
</script>
<style scope>

</style>
