mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[Improvement] ImagePreview: optimize click detect (#1042)
This commit is contained in:
parent
8424b51aff
commit
5776327094
@ -60,7 +60,7 @@ export default create({
|
|||||||
const { offsetX, offsetY } = this.$refs.swipe;
|
const { offsetX, offsetY } = this.$refs.swipe;
|
||||||
|
|
||||||
// prevent long tap to close component
|
// prevent long tap to close component
|
||||||
if (deltaTime < 100 && offsetX < 20 && offsetY < 20) {
|
if (deltaTime < 500 && offsetX < 10 && offsetY < 10) {
|
||||||
this.$emit('input', false);
|
this.$emit('input', false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user