fix(Picker): compatible with desktop scenario (#5430)
This commit is contained in:
@@ -140,9 +140,14 @@ export default createComponent({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const index = this.getIndexByOffset(this.offset);
|
const index = this.getIndexByOffset(this.offset);
|
||||||
this.moving = false;
|
|
||||||
this.duration = DEFAULT_DURATION;
|
this.duration = DEFAULT_DURATION;
|
||||||
this.setIndex(index, true);
|
this.setIndex(index, true);
|
||||||
|
|
||||||
|
// compatible with desktop scenario
|
||||||
|
// use setTimeout to skip the click event triggered after touchstart
|
||||||
|
setTimeout(() => {
|
||||||
|
this.moving = false;
|
||||||
|
}, 0);
|
||||||
},
|
},
|
||||||
|
|
||||||
onTransitionEnd() {
|
onTransitionEnd() {
|
||||||
|
|||||||
Reference in New Issue
Block a user