desc-footer.vue
2.09 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
<template>
<div class="footer">
<TextEllipsis :text="text" class="desc" :isLimitHeight="isLimitHeight" :height="75">
<template slot="more"><span>...</span><span class="link" @click="onClick">展开</span></template>
<span slot="after" v-if="!isLimitHeight" @click="isLimitHeight=true"></span>
</TextEllipsis>
<div class="product-wrapper">
<div class="products">
<Products></Products>
</div>
<div class="share">
<WidgetIconBtn class="item" type="msg" text="100" :option="option" @click="onCommentClick"></WidgetIconBtn>
<WidgetIconBtn class="item" type="fav" text="100" :option="option" @click="onFavClick"></WidgetIconBtn>
</div>
</div>
</div>
</template>
<script>
import Products from './products';
export default {
name: 'DescFooter',
components: {
Products,
},
data() {
return {
text: '很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双,很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双',
isLimitHeight: true,
option: {
emitName: 'click',
color: 'white'
}
};
},
methods: {
onClick() {
console.log('展开');
this.isLimitHeight = false;
},
onCommentClick() {
this.$emit('on-comment-click', {});
},
onFavClick() {
this.$emit('on-favorite-click', {});
}
},
};
</script>
<style lang="scss" scoped>
.footer {
position: relative;
min-height: 280px;
background: rgba(0, 0, 0, 0.5);
}
.desc {
min-height: 134px;
font-size: 26px;
color: white;
letter-spacing: 0.01px;
padding: 30px 28px 0 28px;
}
.product-wrapper {
display: flex;
justify-content: space-between;
height: 166px;
padding: 0 28px;
}
.products {
display: inline-block;
width: 290px;
height: 100px;
margin-top: 36px;
}
.link {
color: #4a90e2;
}
.share {
height: 100px;
margin-top: 86px;
}
.item {
margin-left: 50px;
}
</style>