[Improvement] ImagePreview: optimize click detect (#1042)

This commit is contained in:
neverland 2018-05-11 16:41:08 +08:00 committed by GitHub
parent 8424b51aff
commit 5776327094
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ export default create({
const { offsetX, offsetY } = this.$refs.swipe;
// prevent long tap to close component
if (deltaTime < 100 && offsetX < 20 && offsetY < 20) {
if (deltaTime < 500 && offsetX < 10 && offsetY < 10) {
this.$emit('input', false);
}
}