2019-05-16 14:21:00 +08:00

27 lines
451 B
JavaScript

// components/swiper/index.js
var app = getApp();
Component({
properties: {
imgUrls: {
type: Object,
value: []
}
},
data: {
circular: true,
autoplay: true,
interval: 3000,
duration: 500,
currentSwiper: 0
},
attached: function () {
console.log(this.data.imgUrls);
},
methods: {
swiperChange: function (e) {
this.setData({
currentSwiper: e.detail.current
})
},
}
})