# 公共列表样式开发(下)
<template>
<view>
<!-- 列表 -->
<view class="common-list">
<!-- 左边头像 -->
<view class="common-list-l">
<image src="../../static/demo/userpic/17.jpg" mode="widthFix" lazy-load></image>
</view>
<!-- 右边内容 -->
<view class="common-list-r">
<!-- 作者 -->
<view class="author-area">
<view>三鱼先生 <view class="icon iconfont icon-nan tag-sex">24</view>
</view>
<view class="icon iconfont icon-zengjia">关注</view>
</view>
<!-- 标题 -->
<view class="title-area">我是标题我是标题我是标题我是标题我是标题我是标题我是标题</view>
<!-- 图片 -->
<view class="image-area u-f-ajc">
<!-- 图片 -->
<!-- <image src="../../static/demo/datapic/13.jpg" mode="widthFix" lazy-load=""></image> -->
<!-- 视频 -->
<!-- <view class="common-list-play icon iconfont icon-bofang">
</view>
<view class="common-list-playinfo">20w 次播放 2:47</view> -->
<!-- 分享 -->
<view class="common-list-share u-f">
<image src="../../static/demo/datapic/16.jpg" mode="widthFix" lazy-load></image>
<view>我是星城</view>
</view>
</view>
<!-- 其它信息 -->
<view class="address-area">
<view>深圳龙岗</view>
<view>
<view class="icon iconfont icon-zhuanfa">10</view>
<view class="icon iconfont icon-pinglun1">20</view>
<view class="icon iconfont icon-dianzan1">30</view>
</view>
</view>
</view>
</view>
</view>
</template>
<style lang="less" scoped>
.common-list {
padding: 20rpx;
display: flex;
.common-list-l {
margin-right: 15rpx;
image {
width: 90rpx;
border-radius: 50%;
}
}
.common-list-r {
border-bottom: 1rpx solid #eee;
padding-bottom: 10rpx;
.author-area {
display: flex;
justify-content: space-between;
view {
display: flex;
align-items: center;
&:first-child {
color: #999;
font-size: 32rpx;
.tag-sex {
background-color: #007aff;
color: #fff;
font-size: 26rpx;
padding: 0 20rpx;
margin-left: 10rpx;
border-radius: 20rpx;
height: 40rpx;
line-height: 40rpx;
}
}
&:last-child {
background-color: #f4f4f4;
padding: 0 10rpx;
font-size: 32rpx;
}
}
}
.title-area {
width: calc(100vw - 145rpx);
font-size: 32rpx;
padding: 12rpx 0;
}
.image-area {
position: relative;
image {
width: 100%;
border-radius: 20rpx;
}
.common-list-play {
position: absolute;
color: #fff;
font-size: 130rpx;
}
.common-list-playinfo {
position: absolute;
right: 10rpx;
bottom: 10rpx;
color: #fff;
background-color: rgba(51,51,51,0.73);
border-radius: 20rpx;
padding: 0 20rpx;
font-size: 26rpx;
}
}
.address-area {
display: flex;
justify-content: space-between;
view {
color: #aaa;
&:last-child {
display: flex;
view {
margin-right: 20rpx;
&:last-child {
margin-right: 0;
}
}
}
}
}
}
}
.common-list-share {
background-color: #eee;
width: 100%;
padding: 10rpx;
border-radius: 20rpx;
image {
width: 200rpx!important;
height: 150rpx!important;
margin-right: 10rpx;
}
}
</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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164