|
本帖最后由 郑薏玮 于 2019-8-16 16:19 编辑
就是通过swiper的回调来动态操控apicloud的启用和禁止,该方法在骁龙660这种规格的cpu就没问题了、iphone上没问题,在古董机上可能会有问题,原因是处理js效率较低,在快速操作上会出现问题,
- var swiper = new Swiper('.swiper-container', {
- spaceBetween: 0,
- centeredSlides: true,
- reverseDirection: true,
- spaceBetween: 20,
- autoplay: {
- delay: 3000,
- disableOnInteraction: false,
- },
- pagination: {
- el: '.swiper-pagination'
- },
- on: {
- slideChangeTransitionEnd: function (e) {
- api.setFrameAttr({ bounces: true })
- },
- sliderMove: function (event) {
- api.setFrameAttr({ bounces: false })
- },
- touchEnd: function (event) {
- api.setFrameAttr({ bounces: true })
- },
- }
- });
复制代码
|
|