<template>
	<view class="box">
		<view class="box_item" v-for="item in list" :key="item.id" @click="goPage('/pages/student/student', item.id)">
			{{ item.name }}（{{ item.number }}）
			<img class="item_img" src="../../static/images/right.png" />
		</view>
		<view class="no_data" v-if="!list.length">暂无数据</view>
	</view>
</template>

<script setup>
import { onLoad } from '@dcloudio/uni-app'

const props = defineProps({
	list: Array
})

onLoad(() => {})

// 点击每一个学生回调
const goPage = (url, id) => {
	console.log(id)
	uni.navigateTo({
		url
	})
}
</script>

<style lang="scss" scoped>
.box {
	margin-top: 22rpx;
	padding: 0 20rpx 60rpx 30rpx;
	box-sizing: border-box;
	width: 710rpx;
	background-color: #fff;
	overflow: hidden;

	.box_item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 90rpx;
		font-size: 28rpx;
		border-bottom: 1rpx solid #e6e6e6;

		.item_img {
			width: 31rpx;
			height: 31rpx;
		}
	}

	.no_data {
		margin-top: 20rpx;
		text-align: center;
		font-size: 28rpx;
	}
}
</style>
