ismail9k / vue3-carousel

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

Sliding with modelValue not work #150

Closed rasstislav closed 2 years ago

rasstislav commented 2 years ago

Hello, I have the following issue / question:

When modelValue is set, sliding to the previous / next slide (click in navigation / pagination or drag) not work. It returns to the original slide. Is it a desired condition or bug? Please watch the attached video / code pen.

Thank you for your response.

https://user-images.githubusercontent.com/9253113/152847730-565127ad-4feb-4c31-8c5e-1b2cfe50696f.mov

kostya110393 commented 2 years ago

Hi! I had this problem but could solve it. You need put :key from index element -

I hope that it help you.
rasstislav commented 2 years ago

Hi! I had this problem but could solve it. You need put :key from index element - I hope that it help you.

Hi @kostya110393! I don't know what you mean. Could you send a code sample?

kostya110393 commented 2 years ago

Привет! У меня была эта проблема, но я смог ее решить. Вам нужно поставить :key из индексного элемента - я надеюсь, что это поможет вам.

Привет @kostya110393 ! Я не знаю, что вы имеете в виду. Не могли бы вы отправить образец кода?

<Slide v-for="(item, index) of banners" :key="index"></Slide>

rasstislav commented 2 years ago

@kostya110393 The solution doesn't work for me. You can try making changes in this example: https://codepen.io/rasstislav/pen/XWzpMaw.

kostya110393 commented 2 years ago

@kostya110393 The solution doesn't work for me. You can try making changes in this example: https://codepen.io/rasstislav/pen/XWzpMaw.

https://codepen.io/Kostya93/pen/ExbLxep

rasstislav commented 2 years ago

It looks good. Thanks @kostya110393!

Amaurgit commented 1 year ago

Hey there, not working for either with vue 3, seems to work with v-model with vue 2 but not vue 3... @ismail9k any idea ? :)

Thanks !