<template>
	<a-card>
		<a-list item-layout="vertical" size="large" :pagination="pagination" :data-source="listData">
			<template #renderItem="{ item }">
				<a-list-item key="item.title">
					<a-list-item-meta :description="item.description">
						<template #title>{{ item.title }}</template>
					</a-list-item-meta>
					{{ item.content }}
				</a-list-item>
			</template>
		</a-list>
	</a-card>
</template>
<script setup>
	import classCentre from '@/api/student/classCentre'
	const listData = ref([])
	const pagination = ref({
		current: 1,
		onChange: (page) => {
			pagination.value.current = page
			pagination.value.pageSize = size
			getList()
		},
		pageSize: 10
	})
	const getList = () => {
		classCentre
			.classNotice({
				current:pagination.value.current,
				size: pagination.value.pageSize
			})
			.then((data) => {
				listData.value = data.records
				pagination.value.total = data.total
			})
	}
	onMounted(() => {
		getList()
	})
</script>
<style scoped>
	.index-message-list {
		overflow: auto;
	}
</style>
