mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Picker): compatible with desktop scenario (#5430)
This commit is contained in:
parent
a154e0683a
commit
e8d01de060
@ -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() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user