EvaluateItem.vue
2.08 KB
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
<template>
<div :class="['share-item', { hideBorder }]">
<div class="content">
<div class="user-info flex">
<div>
<img class="icon-head" :src="item.imageUrl" />
<!-- <div v-else class="sprite-icon icon-avatar"></div> -->
</div>
{{ item.name }}
</div>
<div :class="['text', { 'text-two-line': indexType }]" v-text="item.experience"></div>
<div :class="['img-box', { four: indexType }]">
<template v-for="(i, index) in item.activityExperienceImgs">
<div @click="jumpPreview(index)" v-if="indexType ? index < 4 : true" class="img-item" :key="index">
<img :src="i.imageUrl" />
</div>
</template>
</div>
</div>
</div>
</template>
<script type="text/ecmascript-6">
export default {
name: 'EvaluateItem',
props: {
hideBorder: Boolean,
indexType: Boolean,
item: {
type: Object,
default: () => { }
},
num: Number,
// 显示默认或真实数据头像和昵称,1-默认;2-真实数据
showAvatarNicknameFlag: Number
},
data() {
return {
}
},
mounted() {
},
methods: {
jumpPreview(index) {
let { activityExperienceImgs, experience } = this.item, item = []
activityExperienceImgs.map(e => item.push(e.imageUrl))
this.to('crowdfunding.imagePreview', { item, index, experience })
}
}
}
</script>
<style scoped lang="scss">
@import '@/assets/css/sharegoods.scss';
.user-info {
padding: 14px 0 10px;
font-size: 16px;
font-weight: 600;
color: #282829;
.sprite-icon {
margin-right: 8px;
}
}
.icon-head {
width: 36px;
height: 36px;
border-radius: 50%;
margin-right: 8px;
}
.text {
font-size: 14px;
color: #282829;
line-height: 20px;
margin-bottom: 13px;
word-break: break-all;
line-break: anywhere;
}
.img-box {
display: flex;
flex-wrap: wrap;
gap: 6px;
.img-item {
width: 110px;
height: 110px;
border-radius: 4px;
overflow: hidden;
}
}
.img-box.four {
gap: 8px;
flex-wrap: nowrap;
.img-item {
width: 75px;
height: 75px;
}
}
</style>