younth / react-swipes

:fire: 基于React的移动端卡片滑动组件
MIT License
185 stars 40 forks source link

自动播放不能循环 #13

Open 13238006592 opened 6 years ago

13238006592 commented 6 years ago

let opt = { distance:document.getElementsByTagName('html')[0].style.fontSize.split('px')[0]*6.8, // 每次移动的距离,卡片的真实宽度 currentPoint: 0,// 初始位置,默认从0即第一个元素开始 autoPlay: true, loop: true, swTouchstart: (ev) => {

        },
        swTouchmove: (ev) => {

        },
        swTouchend: (ev) => {
            let data = {
                moved: ev.moved,
                originalPoint: ev.originalPoint,
                newPoint: ev.newPoint,
                cancelled: ev.cancelled
            }
            console.log(ev);
            this.setState({
                curCard: ev.newPoint
            })
        }
    }

用在react移动端项目中,不能循环播放

younth commented 6 years ago

@13238006592 你的问题解决了吗?是什么机型