ismail9k / vue3-carousel

Vue 3 carousel component
https://ismail9k.github.io/vue3-carousel/
MIT License
661 stars 164 forks source link

Carousel is not emitting events #262

Closed axelkennedal closed 1 year ago

axelkennedal commented 1 year ago

Describe the bug According to the documentation there are two events slide-start and slide-end that should be emit by the Carousel component when sliding starts and ends.

These events are never emitted.

To Reproduce Steps to reproduce the behavior:

Create a Carousel like so:

<template>
  ...
  <Carousel @slide-start="handleSlideStart">...
</template>

<script setup>
  const handleSlideStart = () => {
    // this is never called...
    console.log("slide start")
  }
  ...
</script>

Expected behavior When using the Carousel on a mobile device/emulator and swiping left/right the function handleSlideStart in the example above should be called.

Screenshots N/a.

Desktop (please complete the following information):

igormaozao commented 1 year ago

Same error here, no event is been emit.

I'm not on mobile or emulator, just a regular desktop.

Windows 10 Chrome 108

ismail9k commented 1 year ago

It looks like it's working fine check this example. Could you provide me with a minimal working example that regenerates your issue?

jakubhruby commented 1 year ago

I had the same issue when using in Nuxt3. It worked fine in dev, but did not work in prod build. I was using 0.2.5, which was affected, but 0.2.6+ works fine

sosog commented 1 year ago

@axelkennedal try @slideStart it can be just compiling runtime issue, not the package. Please copy your package.json if it doesn't help you.

axelkennedal commented 1 year ago

Unfortunately I cannot provide my code, but yes it does indeed seem to work from @ismail9k `s example. So I guess we can close this.