swiper.vue
1.43 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
<template>
<div class="swiper">
<div class="swiper-item swiper-item-left">
<a :href="list[0].url">
<ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[0].src" :width="302" :height="402"></ImageFormat>
</a>
</div>
<div class="swiper-item swiper-item-right">
<a :href="list[1].url">
<ImageFormat @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[1].src" :width="374" :height="196"></ImageFormat>
</a>
<a :href="list[2].url">
<ImageFormat style="margin-top: 4px" @click="clickHandler(item, index)" :lazy="false" class="item-imge" :src="list[2].src" :width="374" :height="196"></ImageFormat>
</a>
</div>
</div>
</template>
<script>
export default {
name: 'swiper',
props: {
list: {
type: Array,
default: true,
},
},
methods: {
jump(item) {
const { src, url } = item;
console.log(src);
console.log(url);
}
}
};
</script>
<style lang="scss" scoped>
.swiper {
// margin-top: -250px;
padding: 0 32px;
overflow: hidden;
.swiper-item {
&.swiper-item-left {
width: 301px;
float: left;
img {
height: 402px;
}
}
&.swiper-item-right {
width: 374px;
float: right;
img {
height: 196px;
}
}
img {
width: 100%;
display: block;
border-radius: 4px;
}
}
}
</style>