desc-footer.vue
1.63 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
<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 type="msg"></WidgetIconBtn>
<WidgetIconBtn type="zan"></WidgetIconBtn>
</div>
</div>
</div>
</template>
<script>
import Products from './products';
export default {
name: 'DescFooter',
components: {
Products,
},
data() {
return {
text: '很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双,很好,能抢到真的不容易!整体感觉很舒服,庆幸下手一定要快准狠!如果能够再抢到一双就更好了,下次加买很多双',
isLimitHeight: true
};
},
methods: {
onClick() {
console.log('展开');
this.isLimitHeight = false;
}
},
};
</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 {
height: 166px;
padding: 0 28px;
}
.products {
display: inline-block;
width: 290px;
height: 100px;
margin-top: 36px;
}
.link {
color: #4a90e2;
}
</style>