swiper.js 676 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. Page({
  2. onShareAppMessage() {
  3. return {
  4. title: 'swiper',
  5. path: 'page/component/pages/swiper/swiper'
  6. }
  7. },
  8. data: {
  9. background: ['demo-text-1', 'demo-text-2', 'demo-text-3'],
  10. indicatorDots: true,
  11. vertical: false,
  12. autoplay: false,
  13. interval: 2000,
  14. duration: 500
  15. },
  16. changeIndicatorDots() {
  17. this.setData({
  18. indicatorDots: !this.data.indicatorDots
  19. })
  20. },
  21. changeAutoplay() {
  22. this.setData({
  23. autoplay: !this.data.autoplay
  24. })
  25. },
  26. intervalChange(e) {
  27. this.setData({
  28. interval: e.detail.value
  29. })
  30. },
  31. durationChange(e) {
  32. this.setData({
  33. duration: e.detail.value
  34. })
  35. }
  36. })