Files
martial-mini/pages/event-players/event-players.vue
2025-11-28 11:04:10 +08:00

208 lines
4.1 KiB
Vue

<template>
<view class="event-players-page">
<!-- 搜索框 -->
<view class="search-bar">
<input class="search-input" placeholder="搜索选手姓名或编号" v-model="searchKey" />
<view class="search-icon">🔍</view>
</view>
<!-- 分类筛选 -->
<view class="category-tabs">
<view
class="category-tab"
v-for="(category, index) in categories"
:key="index"
:class="{ active: currentCategory === index }"
@click="currentCategory = index"
>
{{ category }}
</view>
</view>
<!-- 选手列表 -->
<view class="players-list">
<view class="player-item" v-for="(player, index) in playersList" :key="index">
<view class="player-number">{{ player.number }}</view>
<view class="player-info">
<view class="player-name">{{ player.name }}</view>
<view class="player-detail">
<text class="detail-text">{{ player.team }}</text>
<text class="detail-divider">|</text>
<text class="detail-text">{{ player.category }}</text>
</view>
</view>
<view class="player-status" :class="player.status">
{{ player.statusText }}
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
searchKey: '',
currentCategory: 0,
categories: ['全部', '男子组', '女子组'],
playersList: [
{
number: '001',
name: '张三',
team: '北京队',
category: '男子散打',
status: 'confirmed',
statusText: '已确认'
},
{
number: '002',
name: '李四',
team: '上海队',
category: '男子散打',
status: 'confirmed',
statusText: '已确认'
},
{
number: '003',
name: '王五',
team: '广东队',
category: '男子套路',
status: 'pending',
statusText: '待确认'
},
{
number: '004',
name: '赵六',
team: '天津队',
category: '男子散打',
status: 'confirmed',
statusText: '已确认'
},
{
number: '005',
name: '刘七',
team: '江苏队',
category: '男子套路',
status: 'confirmed',
statusText: '已确认'
}
]
};
}
};
</script>
<style lang="scss" scoped>
.event-players-page {
min-height: 100vh;
background-color: #f5f5f5;
}
.search-bar {
background-color: #fff;
padding: 20rpx 30rpx;
display: flex;
align-items: center;
gap: 15rpx;
}
.search-input {
flex: 1;
background-color: #f5f5f5;
border-radius: 50rpx;
padding: 20rpx 30rpx;
font-size: 28rpx;
}
.search-icon {
font-size: 32rpx;
}
.category-tabs {
background-color: #fff;
display: flex;
padding: 20rpx 30rpx;
gap: 20rpx;
margin-bottom: 20rpx;
}
.category-tab {
padding: 12rpx 30rpx;
border-radius: 50rpx;
font-size: 26rpx;
color: #666666;
background-color: #f5f5f5;
}
.category-tab.active {
background-color: #C93639;
color: #fff;
}
.players-list {
padding: 0 30rpx 20rpx;
}
.player-item {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 20rpx;
display: flex;
align-items: center;
gap: 20rpx;
}
.player-number {
width: 80rpx;
height: 80rpx;
background-color: #C93639;
color: #fff;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
font-weight: bold;
flex-shrink: 0;
}
.player-info {
flex: 1;
}
.player-name {
font-size: 32rpx;
font-weight: bold;
color: #333333;
margin-bottom: 8rpx;
}
.player-detail {
font-size: 24rpx;
color: #666666;
}
.detail-divider {
margin: 0 10rpx;
}
.player-status {
padding: 8rpx 20rpx;
border-radius: 8rpx;
font-size: 24rpx;
flex-shrink: 0;
}
.player-status.confirmed {
background-color: #E8F5E9;
color: #4CAF50;
}
.player-status.pending {
background-color: #FFF3E0;
color: #FF9800;
}
</style>