forked from profectus/Profectus
setupHoldToClick calls stop on unmount
This commit is contained in:
parent
3682582fc3
commit
563bf76bee
1 changed files with 3 additions and 0 deletions
|
@ -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 };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue