Update MkPullToRefresh.vue

This commit is contained in:
syuilo 2025-05-03 10:14:01 +09:00
parent bfbcc71008
commit 86daa7cba5
1 changed files with 6 additions and 0 deletions

View File

@ -139,6 +139,7 @@ async function closeContent() {
}
function onPullRelease() {
window.document.body.removeAttribute('inert');
startScreenY = null;
if (isPulledEnough.value) {
isPulledEnough.value = false;
@ -181,6 +182,11 @@ function moving(event: MouseEvent | TouchEvent) {
const moveHeight = moveScreenY - startScreenY!;
pullDistance.value = Math.min(Math.max(moveHeight, 0), MAX_PULL_DISTANCE);
// pull
if (pullDistance.value > 3) { //
window.document.body.setAttribute('inert', 'true');
}
isPulledEnough.value = pullDistance.value >= FIRE_THRESHOLD;
}