|
@@ -1,9 +1,12 @@
|
1
|
1
|
<template>
|
2
|
|
- <swiper>
|
3
|
|
- <swiper-slide v-for="(item, index) in list" :key="item.image" @click.native="$emit('clickItem', index)">
|
4
|
|
- <pure-image :bg-image="item.image"></pure-image>
|
5
|
|
- </swiper-slide>
|
6
|
|
- </swiper>
|
|
2
|
+ <div style="height: 100%">
|
|
3
|
+ <swiper :options="options">
|
|
4
|
+ <swiper-slide v-for="(item, index) in list" :key="item.image" @click.native="$emit('clickItem', index)">
|
|
5
|
+ <pure-image :bg-image="item.image"></pure-image>
|
|
6
|
+ </swiper-slide>
|
|
7
|
+ </swiper>
|
|
8
|
+ <div class="project-swiper-pagination"></div>
|
|
9
|
+ </div>
|
7
|
10
|
</template>
|
8
|
11
|
|
9
|
12
|
<script>
|
|
@@ -14,6 +17,15 @@ export default {
|
14
|
17
|
},
|
15
|
18
|
data() {
|
16
|
19
|
return {
|
|
20
|
+ options: {
|
|
21
|
+ autoplay: {
|
|
22
|
+ delay: 2500,
|
|
23
|
+ disableOnInteraction: false
|
|
24
|
+ },
|
|
25
|
+ pagination: {
|
|
26
|
+ el: '.project-swiper-pagination'
|
|
27
|
+ }
|
|
28
|
+ },
|
17
|
29
|
list: [
|
18
|
30
|
{
|
19
|
31
|
image: require('@/assets/perjectImages/1.png')
|
|
@@ -44,3 +56,19 @@ export default {
|
44
|
56
|
}
|
45
|
57
|
}
|
46
|
58
|
</script>
|
|
59
|
+
|
|
60
|
+<style lang="scss">
|
|
61
|
+.project-swiper-pagination {
|
|
62
|
+ width: 100%;
|
|
63
|
+ text-align: center;
|
|
64
|
+
|
|
65
|
+ .swiper-pagination-bullet {
|
|
66
|
+ width: .15rem;
|
|
67
|
+ height: .15rem;
|
|
68
|
+
|
|
69
|
+ & + .swiper-pagination-bullet {
|
|
70
|
+ margin-left: 6px;
|
|
71
|
+ }
|
|
72
|
+ }
|
|
73
|
+}
|
|
74
|
+</style>
|