# 封装好友组件列表

<template>
	<view class="user-list animated fadeInLeft fast">
		<view class="user-left">
			<image :src="item.userpic" mode="widthFix" lazy-load></image>
		</view>
		<view class="user-center">
			<view class="nichen">{{item.username}}</view>
			<view style="display: inline-block;">
				<tagSexAge :sex="item.sex" :age="item.age"></tagSexAge>
			</view>
		</view>
		<view class="user-right icon iconfont" :class="[item.isguanzhu?'icon-xuanze-yixuan':'icon-zengjia1']"></view>
	</view>
</template>

<script>
	// 性别组件
	import tagSexAge from '../../components/common/tag-sex-age.vue'
	export default {
		components:{
			tagSexAge
		},
		props:{
			item: Object,
			index: Number
		}
	}
</script>

<style lang="less" scoped>
	.user-list {
		margin: 0 20rpx;
		display: flex;
		border-bottom: 1px solid #eee;
	
		.user-left {
			width: 100rpx;
			height: 100rpx;
			flex-shrink: 0;
			margin-right: 20rpx;
	
			image {
				width: 100%;
				border-radius: 50%;
			}
		}
	
		.user-center {
			flex: 1;
	
			.nichen {
				font-size: 35rpx;
			}
		}
	
		.user-right {
			display: flex;
			align-items: center;
			justify-content: center;
			color: #ccc;
		}
	
		.icon-zengjia1 {
			color: #f8791b;
		}
}
</style>
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
上次更新: 2021/2/22 上午10:53:04