-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest4.html
34 lines (31 loc) · 856 Bytes
/
test4.html
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
<template>
<div v-swiper:mySwiper="swiperOption">
<div class="swiper-wrapper">
<div class="swiper-slide" :key="banner" v-for="banner in banners">
<img :src="banner">
</div>
</div>
<div class="swiper-pagination"></div>
</div>
</template>
<script>
export default {
data () {
return {
banners: [require('./img/1.jpg'),require('./img/2.jpg'),require('./img/3.jpg')],
swiperOption: {
pagination: {
el: '.swiper-pagination',
},
autoplay:true,
loop: true,
// ...
}
}
},
mounted() {
console.log('Current Swiper instance object', this.mySwiper)
this.mySwiper.slideTo(3, 1000, false)
}
}
</script>