K
K
Kotaro Hiba2020-11-27 17:34:33
Vue.js
Kotaro Hiba, 2020-11-27 17:34:33

How to swipe the vue-slick slider to the desired item?

Does the vue-slick plugin have a method that swipes the slider to a specific item? I read the documentation, I can’t find it, they told me that it seemed to be like that.
But I'm either looking in the wrong direction, or he doesn't have such a method, help me finish the task.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2020-11-27
@lina666

I read the documentation but can't find it

Not in the documentation - you can look into the code .
<vue-slick ref="slider">
  ...
</vue-slick>

<button @click="$refs.slider.goTo(4)">перейти к четвёртому слайду</button>
<button @click="$refs.slider.goTo(7, true)">перейти к седьмому слайду, без анимации</button>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question