vue-splide
vue-splide copied to clipboard
not able to access controller methods other than .go()
Checks
- [X] Not a duplicate.
- [X] Not a question, feature request, or anything other than a bug report directly related to Vue Splide. Use Discussions for these topics: https://github.com/Splidejs/splide/discussions
Version
0.6.12
Description
I have it like this in my template
<template>
<Splide :options="options" ref="splide" @splide:active="onSlideMove">
<SplideSlide>
<TheMainPie />
</SplideSlide>
<SplideSlide>
<TheMainBarChart />
</SplideSlide>
</Splide>
[...]
</template>
<script setup>
const splide = ref(null)
onMounted(() => {
const slider = splide.value.splide;
slider.go(1); // working as expected
slider.scroll(1); // Unhandled Promise Rejection: TypeError: slider.scroll is not a function
slider.move(1) // error
...
})
</script>
Reproduction Link
No response
Steps to Reproduce
- setup splide
- call splide methods via instance ...
Expected Behaviour
can use all the controller methods from original docs