vux
vux copied to clipboard
滑动立即点击,导致swiper-item更新但v-model没有更新
重现步骤:滑动 立即点击屏幕
应该是 点击屏幕触发的touchstart 截断了动画结束函数,没有相应更新数据。
尝试了一下 在145行的me.touchstartHandler函数内加上以下或许可以解决问题 if(me._isMoved) { me._activate(me._current) // 刚发现这句似乎要加上 let cb = me._eventHandlers.swiped cb && cb.apply(me, [me._prev % me.count, me._current % me.count]) } ----------------update 测试用其他方式阻断了 所以我改为在 _setTransition函数里加 setTimeout(()=>{ let cb = this._eventHandlers.swiped cb && cb.apply(this, [this._prev % this.count, this._current % this.count]) },duration)