Update slider
This commit is contained in:
@@ -63,7 +63,7 @@ const useSlider = ({ duration = 0, count }: Props) => {
|
||||
const restartSliderTimer = () => {
|
||||
if (sliderTimer.value) clearInterval(sliderTimer.value);
|
||||
runProgress();
|
||||
|
||||
|
||||
if (duration > 0) {
|
||||
sliderTimer.value = setInterval(() => {
|
||||
runProgress();
|
||||
@@ -76,7 +76,9 @@ const useSlider = ({ duration = 0, count }: Props) => {
|
||||
restartSliderTimer();
|
||||
});
|
||||
|
||||
onUnmounted(() => {});
|
||||
onUnmounted(() => {
|
||||
restartSliderTimer();
|
||||
});
|
||||
|
||||
return {
|
||||
activeSlide,
|
||||
|
||||
Reference in New Issue
Block a user