<template>
	<view>
		<view 
			class="single-driver"
			v-for="(driver, index) in driverList"
			:key="index"
		>
			<view>
				<text style="color: #000;">{{ driver.name }}</text>
				<h4>持证</h4>
			</view>
			<view>
				<text>年龄：<span style="color: #000;">{{ driver.age }}</span></text>
				<span style="color: #909090;">电话：</span><span style="color: #FF6B2B; font-weight: bold;">{{ driver.tel }}</span>
			</view>
			<view style="border-bottom: 1px solid #DADADA;">
				<text>性别：<span style="color: #000;">{{ driver.gender }}</span></text>
				<text>身份证号：<span style="color: #000;">{{ driver.idCard }}</span></text>
			</view>
			<h3>
				<view class="btn-lef">编辑</view>
				<view class="btn-rig">删除</view>
			</h3>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				driverList: [
					{
						name: '张章程',
						age: '24',
						gender: '男',
						tel: '18756518502',
						idCard: '34**************13'
					},
					{
						name: '崔小花',
						age: '36',
						gender: '女',
						tel: '15288463027',
						idCard: '34**************28'
					}
				]
			}
		},
		methods: {
			
		},
		onNavigationBarButtonTap() {
			uni.navigateTo({
				url: '/pages/addDriver/addDriver'
			})
		}
	}
</script>

<style lang="scss">
	body{
		background-color: #F7F7F7;
	}
	.single-driver{
		width: 90%;
		margin: 20rpx auto;
		box-sizing: border-box;
		padding: 25rpx;
		background-color: #fff;
		border-radius: 15rpx;
		display: flex;
		flex-direction: column;
		view{
			display: flex;
			align-items: center;
			font-size: 14px;
			box-sizing: border-box;
			padding-bottom: 15rpx;
			text{
				margin-right: 30rpx;
				color: #909090;
			}
			h4{
				font-weight: normal;
				box-sizing: border-box;
				padding: 5rpx 10rpx;
				border: 1px solid #85B8BC;
				color: #85B8BC;
				border-radius: 10rpx;
			}
		}
		view:last-child{
		}
		h3{
			width: 100%;
			font-weight: normal;
			display: flex;
			box-sizing: border-box;
			padding-top: 15rpx;
			justify-content: flex-end;
			font-size: 14px;
			view{
				box-sizing: border-box;
				padding: 6rpx 12rpx;
				border-radius: 15rpx;
				color: #fff;
			}
			.btn-lef{
				margin-right: 15rpx;
				background-color: #7D9EFF;
			}
			.btn-rig{
				background-color: #FFB77C;
			}
		}
	}
</style>
