ballNav.vue 3.5 KB
<template>
	<view class="ballNav">
		<view class="headerNav">
			<u-tabs :list="navlist" :lineColor="ThemeColor.PrimaryColor">
				<view slot="right" style="padding-left: 4px;" @tap="propShow">
					<u-icon name="grid" :color="ThemeColor.PrimaryColor" size="24"></u-icon>       
				</view>
			</u-tabs>
		</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="ThemeColor.PrimaryColor" 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>
	import ThemeColor from '@/utils/themeColor.js'
	export default {
		data(){
			return {
				ThemeColor,
				navlist: [
					{ name: '羽毛球', iconName: 'icon-yumaoqiu1' },
					{ name: '足球', iconName: 'icon-zuqiu' },
					{ name: '篮球', iconName: 'icon-lanqiu' },
					{ name: '排球', iconName: 'icon-paiqiu' },
					{ name: '乒乓球', iconName: 'icon-pingpangqiu' },
					{ name: '网球', iconName: 'icon-wangqiu1' },
					{ name: '排球', iconName: 'icon-paiqiu' },
					{ name: '台球', iconName: 'icon-taiqiu' },
					{ name: '高尔夫球', iconName: 'icon-gaoerfu2' },
					{ name: '棒球', iconName: 'icon-bangqiu' }
				],
				activeStyle: {
					color: '#111111',
					fontSize: '30rpx'
				},
				timeList: [
					{ iconName: 'calendar', time: '2月25日(今天' },
					{ iconName: 'clock', time: '14:00 - 15:00 1小时' }
				]
			}
		},
		methods: {
			propShow(){
				this.$emit('showList', true)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.ballNav{
		padding: 0 24rpx;
		min-height: 452rpx;
		background: #FFFFFF;
		margin: 62rpx 0 28rpx 0;
		border-radius: 8rpx;
		box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
		.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: $uni-color-primary;
				border-radius: 8rpx 8rpx 8rpx 8rpx;
			}
			.boking{
				border: 2rpx solid $uni-color-primary;
			}
			.ball {
				background: linear-gradient( 270deg, $uni-color-primary 0%, #FCD723 100%);
				color: #fff;
			}
		}
	}
</style>