Closed weathon closed 3 years ago
I think it is a problem of ionic, though
If I add the code after the page is loaded, it works. But if I add it before, it doesn't
What is the version of vue3-carousel, you are using?
The latest
In order to help me debugging this issue could you provide me with a minimal working example, on CodeSandbox or JSfiddle
Sorry for the late response, I figured it out. It is ionic's issue. Thank you
Sorry for the late response, I figured it out. It is ionic's issue. Thank you
Hey, i'm faced with exact the same problem, using Vue3 and compositiopn API. Please, can you tell me how did u fixed this problem?
@Pankechi This is my first post on a Github Issue, so apologies if it's hard to read.
A temporary solution is described below. Please try it.
<Carousel ref="myCarousel"> ... </Carousel>
import { ref } from 'vue'
setup() {
const myCarousel = ref(null)
onMounted(async () => {
...
get some images
...
(myCarousel.value as any).updateSlidesData();
});
return {
myCarousel,
}
}
@ahpoo Still not working for me. Here's my code. But anyway, thanks a lot for the answer.
const myCarousel = ref(null)
onMounted(() => myCarousel.value.updateCarousel())
(used with vue and ionic)
It always stays at page one whatever you do. But if I change the window size it will work again.
Code: