Compare commits

..

No commits in common. "be2a401d23670185e4715b166312ea73686fc2b7" and "b4e3c3374cad9fdbd5271f147721d0e4defda9cf" have entirely different histories.

2 changed files with 3 additions and 13 deletions

View File

@ -192,7 +192,7 @@ export default defineComponent({
const { offsetX, offsetY } = touch;
const deltaTime = Date.now() - touchStartTime;
const TAP_TIME = 250;
const TAP_OFFSET = 5;
const TAP_OFFSET = 10;
if (
offsetX.value < TAP_OFFSET &&

View File

@ -2,7 +2,6 @@ import {
ref,
watch,
computed,
nextTick,
onBeforeUnmount,
defineComponent,
getCurrentInstance,
@ -160,17 +159,8 @@ export default defineComponent({
};
const onLazyLoaded = ({ el }: { el: HTMLElement }) => {
const check = () => {
if (el === imageRef.value && loading.value) {
onLoad();
}
};
if (imageRef.value) {
check();
} else {
// LazyLoad may trigger loaded event before Image mounted
// https://github.com/youzan/vant/issues/10046
nextTick(check);
if (el === imageRef.value && loading.value) {
onLoad();
}
};