<template>
	<view class="common-list">
		<view class="common-list-box" v-for="(i,index) in data" :key="i.index" @click="toDtl(data[index])">
			<view class="text">
				<view class="text-list"  v-for="(j,jndex) in config"  :key="jndex">
					<span class="label">
						{{j.label}}
					</span>
					<span class="value">
						{{i[j.key]}}
					</span>
				</view>
			</view>
			<view class="more">
				<uni-icons type="forward" class="icon" size="30"></uni-icons>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		name:"common-list",
		props:{
			config:{
				type:Array
			},
			data:{
				type:Array
			},
		},
		methods:{
			toDtl(i){
				this.$emit('listClick',i)
			},
		},
	}
</script>

<style lang="less">
	.common-list{
		.common-list-box{
			background-color: #fff;
			padding: 24rpx;
			margin-top: 6rpx;
			display: flex;
			justify-content: space-between;
			.text{
				.text-list{
					line-height: 60rpx;
					.label{
						color: #999999;
					}
					.value{
						color: #000;
						margin-left: 20rpx;
					}
				}
			}
			.more{
				display: flex;
				align-items: center;
			}
		}
	}
</style>