# 封装话题列表组件
<template>
<view class="topic-list">
<image :src="item.titlepic" mode="widthFix"></image>
<view class="topic-content">
<view>#{{item.title}}#</view>
<view>{{item.desc}}</view>
<view>动态 {{item.totalnum}} 今日 {{item.todaynum}}</view>
</view>
</view>
</template>
<script>
export default {
props:{
item: Object,
index: Number
}
}
</script>
<style lang="less" scoped>
// 最近更新
.topic-new {
padding: 20rpx;
view {
&:first-child {
font-size: 32rpx;
}
}
.topic-list {
padding: 20rpx 0;
border-bottom: 1rpx solid #eee;
display: flex;
image {
width: 150rpx;
height: 150rpx;
border-radius: 10rpx;
margin-right: 20rpx;
}
.topic-content {
view {
color: #a4a4a4;
&:first-child {
color: #333;
font-size: 32rpx;
}
}
}
}
}
</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
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