| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <template>
- <view class="box">
- <view class="box_item" v-for="item in list" :key="item.id" @click="goPage(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,
- appType: String
- })
- onLoad(() => {})
- // 点击每一个学生回调
- const goPage = (id) => {
- // console.log(id)
- if (props.appType == '学生轨迹') {
- uni.navigateTo({
- url: `/pages/track/track?id=${id}`
- })
- } else {
- uni.navigateTo({
- url: '/pages/student/student'
- })
- }
- }
- </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>
|