Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dist/index/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Component({
timer : null
})
}

this.data.timer = setTimeout(()=>{
const data = [];
indexItems.forEach((item) => {
Expand All @@ -71,7 +71,7 @@ Component({
this.setData({
timer : this.data.timer
})

}
},
handlerScroll(event){
Expand Down Expand Up @@ -117,7 +117,7 @@ Component({
const touches = event.touches[0] || {};
const pageY = touches.pageY;
const rest = pageY - data.startTop;
let index = Math.ceil( rest/data.itemHeight );
let index = Math.floor( rest/data.itemHeight );
index = index >= data.itemLength ? data.itemLength -1 : index;
const movePosition = this.getCurrentItem(index);

Expand Down Expand Up @@ -155,4 +155,4 @@ Component({
}).exec()
}
}
})
})