1.0.2 • Published 6 years ago
f-image-slider v1.0.2
f-image-slider
A swiper component for vue.
Install
yarn add f-image-slider --dev思路
- 通过数据
selected驱动轮播 - 当
touch事件触发时,让此时的动画瞬间静止。timer消除,transition动画也消除 - 让
touchmove来接管,当图片的left > (mediawidth / 2),即可切换,但是此时还不能切换 - 当touchend的时候,通过判断
left决定selected,先更改数据,数据是一切的源头