setupHoldToClick calls stop on unmount

This commit is contained in:
thepaperpilot 2022-03-11 17:01:22 -06:00
parent 3682582fc3
commit 563bf76bee

View file

@ -14,6 +14,7 @@ import {
DefineComponent, DefineComponent,
defineComponent, defineComponent,
isRef, isRef,
onUnmounted,
PropType, PropType,
ref, ref,
Ref, Ref,
@ -113,6 +114,8 @@ export function setupHoldToClick(
} }
} }
onUnmounted(stop);
return { start, stop, handleHolding }; return { start, stop, handleHolding };
} }