hot.vue
1.65 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
<template>
<div class="hot" v-if="list.length > 0">
<ul>
<li v-for="(item, index) in list" :key="index" @click="goProduct(item)">
<div class="hot-image">
<ImgSize class="item-imge" :src="item.image_url" :width="100" :height="80"/>
</div>
<div class="hot-name">{{item.series_name}}</div>
</li>
<li @click="goMore">
<div class="hot-image hot-more">更多</div>
<div class="hot-name">More</div>
</li>
</ul>
</div>
</template>
<script>
import ImgSize from '../../../../components/img-size';
export default {
name: 'hot',
props: {
list: {
type: Array,
default: true,
},
},
components: {
ImgSize,
},
methods: {
goProduct() {
alert('跳转列表!');
},
goMore() {
alert('跳转更多!');
}
// onClick() {
// this.$yoho.goNewPage({
// url: 'https://activity.yoho.cn/feature/5729.html?title=活动规则&openby:yohobuy={"action":"go.h5","params":{"title":"活动规则","url":"https://activity.yoho.cn/feature/5729.html"}}'
// });
// }
}
};
</script>
<style lang="scss" scoped>
.hot {
margin: 40px 0;
ul {
overflow: hidden;
li {
width: 25%;
float: left;
text-align: center;
margin-top: 20px;
.hot-image {
width: 150px;
height: 100px;
overflow: hidden;
margin: 0 auto;
img {
width: 100%;
height: 100%;
display: block;
}
}
.hot-name {
margin-top: 20px;
}
.hot-more {
line-height: 100px;
border: 1px solid #999;
}
}
}
}
</style>