ballNav.vue
3.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
<template>
<view class="ballNav">
<view class="headerNav">
<u-tabs :list="navlist" lineColor="#FFA100"></u-tabs>
<view class="classify">
<u-icon name="grid" color="#FFA100" size="24" :activeStyle="activeStyle" @click="isShow = !isShow"></u-icon>
</view>
<view class="select_ball" :class="{show: isShow}">
<view class="ball_item" @click="isShow = false">飞盘</view>
<view class="line"></view>
<view class="ball_item" @click="isShow = false">网球</view>
</view>
</view>
<view class="date_show">
<view class="date_item" v-for="(item, index) in timeList" :key="index">
<view class="left">
<u-icon :name="item.iconName" color="#FFA100" size="22"></u-icon>
<text style="margin-left: 18rpx;">{{ item.time }}</text>
</view>
<view class="right">
<u-icon name="more-dot-fill" color="#999"></u-icon>
</view>
</view>
</view>
<view class="btn_list">
<view class="boking">立即找场</view>
<view class="ball">发起约球</view>
</view>
</view>
</template>
<script>
export default {
data(){
return {
isShow: false, // 是否显示下拉列表
navlist: [
{ name: '篮球', id: '1'},
{ name: '足球', id: '2'},
{ name: '羽毛球', id: '3'},
{ name: '乒乓球', id: '4'}
],
activeStyle: {
color: '#111111',
fontSize: '30rpx'
},
timeList: [
{ iconName: 'calendar', time: '2月25日(今天' },
{ iconName: 'clock', time: '14:00 - 15:00 1小时' }
]
}
}
}
</script>
<style lang="scss" scoped>
.ballNav{
padding: 0 24rpx;
min-height: 452rpx;
background: #FFFFFF;
margin: 62rpx 0 28rpx 0;
border-radius: 4rpx 4rpx 4rpx 4rpx;
.headerNav{
position: relative;
.classify{
position: absolute;
width: 50rpx;
height: 50rpx;
right: 0;
top: 50%;
transform: translateY(-50%);
}
.select_ball{
position: absolute;
top: 76rpx;
left: 64%;
padding: 22rpx;
width: 220rpx;
min-height: 196rpx;
background: #FFFFFF;
box-shadow: 0rpx 12rpx 32rpx 0rpx rgba(0,0,0,0.1);
border-radius: 12rpx;
z-index: 99;
box-sizing: border-box;
opacity: 0;
transition: all .5s ease;
&.show{
opacity: 1;
}
.ball_item{
text-align: center;
font-size: 28rpx;
color: #333;
}
.line{
height: 2rpx;
background-color: #E1E1E1;
margin: 34rpx 0 ;
}
}
}
.date_show{
.date_item{
display: flex;
align-items: center;
justify-content: space-between;
height: 100rpx;
box-sizing: border-box;
border-bottom: 2rpx solid #E1E1E1;
.left {
display: flex;
align-items: center;
font-size: 28rpx;
line-height: 32rpx;
color: #111;
}
}
}
.btn_list{
display: flex;
align-items: center;
justify-content: space-between;
gap: 30rpx;
margin: 40rpx 0 54rpx 0;
.boking, .ball {
flex: 1;
height: 72rpx;
line-height: 72rpx;
text-align: center;
font-size: 28rpx;
color: #FFA100;
border-radius: 8rpx 8rpx 8rpx 8rpx;
}
.boking{
border: 2rpx solid #FFA100;
}
.ball {
background: linear-gradient( 270deg, #FFA100 0%, #FCD723 100%);
color: #fff;
}
}
}
</style>