sharpei 发表于 2019-4-17 23:52:09

我在cube切换模式下使用Animate出现页面内容错乱

我使用swiper做一个全屏的页面切换,每个slide都占满满屏,然后我在slide内容里加了swiperAinmate 后,方法按照官网提供的用法,动画正常可以用,但是却出现了一个问题,就是其他slide里面内容,残留在某个slide上,好比我最后一张的slide内容残留在第二张slide上,这是为什么,怎么解决,swiper配置如图显示
this.mySwiper = new Swiper('.swiper-container', {
    direction: 'vertical', // 垂直切换选项
    speed: 600,
    effect: 'cube',
    keyboard: true,
    mousewheel: true,
    allowTouchMove: false,
    // 如果需要分页器
    pagination: {
      el: '.swiper-pagination',
    },
    on: {
      init: function(){
            swiperAnimateCache(this); //隐藏动画元素
            swiperAnimate(this); //初始化完成开始动画
      },
      slideChangeTransitionEnd: function(){
            swiperAnimate(this); //每个slide切换结束时也运行当前slide动画
            this.slides.eq(this.activeIndex).find('.ani').removeClass('ani'); //动画只展现一次,去除ani类名
   }   }

2091545890 发表于 2019-12-24 14:08:20

请问你是怎么解决的?
页: [1]
查看完整版本: 我在cube切换模式下使用Animate出现页面内容错乱