swiper.vue
2.4 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
98
99
100
101
102
103
104
105
106
107
108
109
110
<template>
<div class="swiper" v-if="list.data && list.data.length > 0">
<div class="swiper-item swiper-item-left">
<LayoutLink :href="list.data[0].url" class="img-link" :report="{...params, I_INDEX: 1, F_URL: list.data[0].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[0].src" :width="310" :height="402"></ImageFormat>
</LayoutLink>
</div>
<div class="swiper-item swiper-item-right">
<LayoutLink :href="list.data[1].url" class="img-link" :report="{...params, I_INDEX: 2, F_URL: list.data[1].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[1].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
<LayoutLink :href="list.data[2].url" class="img-link" :report="{...params, I_INDEX: 3, F_URL: list.data[2].url}">
<ImageFormat :lazy="false" class="item-imge" :src="list.data[2].src" :width="380" :height="196"></ImageFormat>
</LayoutLink>
</div>
</div>
</template>
<script>
export default {
name: 'swiper',
props: {
list: {
type: Object,
},
index: {
type: Number,
}
},
data() {
return {
params: {},
}
},
mounted() {
console.log(this.list)
},
activated() {
let { template_id, template_name } = this.list;
let PAGE_URL = window.location.href;
let F_INDEX = this.index + 1;
let params = {
P_NAME: 'XY_UFOHome',
P_PARAM: 'cfcd8de156d3edc26c84091804c43e23',
F_ID: template_id,
PAGE_URL,
F_INDEX,
F_NAME: template_name,
}
this.params = params;
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.swiper {
display: flex;
align-content: stretch;
justify-content: space-between;
height: 402px;
margin-left: 8px;
margin-right: 8px;
.swiper-item {
position: relative;
&:after {
content: "";
position: absolute;
width: 100%;
height: 100%;
z-index: -2;
border-radius: 8px;
box-shadow: 0 0 30px #dcdcdc;
bottom: 0;
}
}
.swiper-item-left {
width: 44%;
}
.swiper-item-right {
width: 54.5%;
display: flex;
flex-direction: column;
justify-content: space-between;
.img-link {
height: 196px;
}
}
.img-link {
max-height: 100%;
display: block;
border-radius: 8px;
overflow: hidden;
img {
width: 100%;
height: 100%;
display: block;
}
}
}
</style>